affichage des inputs activable via une variable dans le code
This commit is contained in:
parent
3c20db686c
commit
7c448591ea
@ -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<Hitbox> listHitboxObj = new ArrayList<>();
|
||||
@ -122,10 +123,12 @@ 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
|
||||
if(showInputListP1){
|
||||
inputListP1 = new UIInputList(inputsP1, 10f, 0f, 0.85f, 110f, engine);
|
||||
engine.add_uiElement(inputListP1);
|
||||
inputListP1.init();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ends the round.
|
||||
@ -147,7 +150,9 @@ public class match {
|
||||
}
|
||||
|
||||
engine.remove_uiElement(matchWon);
|
||||
if(showInputListP1){
|
||||
engine.remove_uiElement(inputListP1);
|
||||
}
|
||||
|
||||
//replacement des sprites
|
||||
objP1.translate(new Vector3f(-p1.getPosX(), -p1.getPosY()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user