diff --git a/src/main/java/gameplay/match/match.java b/src/main/java/gameplay/match/match.java index 57fa093..50e763b 100644 --- a/src/main/java/gameplay/match/match.java +++ b/src/main/java/gameplay/match/match.java @@ -76,6 +76,7 @@ public class match { private static HorizontalProgressBar healthBarP2Obj; private static UIElementText timerUI; private static UIElementText fpsCounter; + private static boolean showInputListP1 = false; private static UIInputList inputListP1; private static UIElementText matchWon; @@ -84,7 +85,7 @@ public class match { private static int rightBoundary; // Debug - public static boolean debugMode=true; + public static boolean debugMode = true; public static boolean showP1Hitbox; public static boolean showP2Hitbox; private static List listHitboxObj = new ArrayList<>(); @@ -122,9 +123,11 @@ public class match { objP1.getShadow().translate(new Vector3f(0f,p1.getPosY(),0)); objP2.getShadow().translate(new Vector3f(0f,p2.getPosY(),0)); // Crée l'InputList - inputListP1 = new UIInputList(inputsP1, 10f, 0f, 0.85f, 110f, engine); - engine.add_uiElement(inputListP1); - inputListP1.init(); + if(showInputListP1){ + inputListP1 = new UIInputList(inputsP1, 10f, 0f, 0.85f, 110f, engine); + engine.add_uiElement(inputListP1); + inputListP1.init(); + } } /** @@ -147,7 +150,9 @@ public class match { } engine.remove_uiElement(matchWon); - engine.remove_uiElement(inputListP1); + if(showInputListP1){ + engine.remove_uiElement(inputListP1); + } //replacement des sprites objP1.translate(new Vector3f(-p1.getPosX(), -p1.getPosY()));