K pour afficher les hitboxs
This commit is contained in:
parent
a282a48612
commit
507037bd37
@ -3,6 +3,7 @@ package engine.input;
|
|||||||
import engine.Engine;
|
import engine.Engine;
|
||||||
import engine.math.Vector3f;
|
import engine.math.Vector3f;
|
||||||
import engine.object.ObjectGl;
|
import engine.object.ObjectGl;
|
||||||
|
import gameplay.match.match;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
import org.lwjgl.glfw.GLFWKeyCallback;
|
import org.lwjgl.glfw.GLFWKeyCallback;
|
||||||
|
|
||||||
@ -24,6 +25,10 @@ public class KeyboardInput extends GLFWKeyCallback {
|
|||||||
else if(key == GLFW_KEY_SPACE && action == GLFW_PRESS) //Switch to wireframe
|
else if(key == GLFW_KEY_SPACE && action == GLFW_PRESS) //Switch to wireframe
|
||||||
if (glGetInteger(GL_POLYGON_MODE) == GL_FILL) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
if (glGetInteger(GL_POLYGON_MODE) == GL_FILL) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||||
else glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
else glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||||
|
else if(key == GLFW_KEY_K && action == GLFW_PRESS){
|
||||||
|
match.showP1Hitbox = !match.showP1Hitbox;
|
||||||
|
match.showP2Hitbox = !match.showP2Hitbox;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isKeyDown(int keyCode) {
|
public static boolean isKeyDown(int keyCode) {
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
package engine.utils;
|
package engine.utils;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.RandomAccessFile;
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import java.nio.IntBuffer;
|
import java.nio.IntBuffer;
|
||||||
import java.nio.channels.FileChannel;
|
|
||||||
|
|
||||||
public class BufferUtilsEngine {
|
public class BufferUtilsEngine {
|
||||||
|
|
||||||
|
@ -82,8 +82,8 @@ public class match {
|
|||||||
private static UIInputList inputListP1;
|
private static UIInputList inputListP1;
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
private static boolean showP1Hitbox = true; // TODO modifier pour le rendre activable
|
public static boolean showP1Hitbox = false; // TODO modifier pour le rendre activable
|
||||||
private static boolean showP2Hitbox = true;
|
public static boolean showP2Hitbox = false;
|
||||||
private static List<Hitbox> listHitboxObj = new ArrayList<>();
|
private static List<Hitbox> listHitboxObj = new ArrayList<>();
|
||||||
private static float slowFactor = 1f;
|
private static float slowFactor = 1f;
|
||||||
private static long timeStampFpsCounter;
|
private static long timeStampFpsCounter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user