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.math.Vector3f;
|
||||
import engine.object.ObjectGl;
|
||||
import gameplay.match.match;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
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
|
||||
if (glGetInteger(GL_POLYGON_MODE) == GL_FILL) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
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) {
|
||||
|
@ -1,12 +1,9 @@
|
||||
package engine.utils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
|
||||
public class BufferUtilsEngine {
|
||||
|
||||
|
@ -82,8 +82,8 @@ public class match {
|
||||
private static UIInputList inputListP1;
|
||||
|
||||
// Debug
|
||||
private static boolean showP1Hitbox = true; // TODO modifier pour le rendre activable
|
||||
private static boolean showP2Hitbox = true;
|
||||
public static boolean showP1Hitbox = false; // TODO modifier pour le rendre activable
|
||||
public static boolean showP2Hitbox = false;
|
||||
private static List<Hitbox> listHitboxObj = new ArrayList<>();
|
||||
private static float slowFactor = 1f;
|
||||
private static long timeStampFpsCounter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user