This commit is contained in:
François Autin 2021-06-25 21:18:18 +02:00
commit e6a07bee7f

View File

@ -326,7 +326,9 @@ public class match {
timerUI = new UIElementText(timer + "", 10f, 0.453f, 0.995f, 85f, engine);
engine.add_uiElement(timerUI);
debugToggle();
if(debugMode){
createDebugHUD();
}
timeStampFpsCounter = System.currentTimeMillis();
//SetTracking
@ -949,17 +951,7 @@ public class match {
}
debugMode = false;
} else {
coordP1 = new UIElementText("objP1: " + objP1.getXPos() + ":" + objP1.getYPos() + " P1: " + p1.getPosX() +":" + p1.getPosY(), 5f, 0f, 0.15f, 70f, engine);
coordP1.setBackground(new Vector3f(0f,0f,0f));
engine.add_uiElement(coordP1);
coordP2 = new UIElementText("objP2: " + objP2.getXPos() + ":" + objP2.getYPos() + " P1: " + p2.getPosX() +":" + p2.getPosY(), 5f, 0f, 0.1f, 70f, engine);
coordP2.setBackground(new Vector3f(0f,0f,0f));
engine.add_uiElement(coordP2);
// FPS counter
fpsCounter = new UIElementText("Boulevard Combattant", 5f, 0f, 0.04f, 100f, engine);
fpsCounter.setBackground(new Vector3f(0f,0f,0f));
engine.add_uiElement(fpsCounter);
debugMode = true;
createDebugHUD();
}
}
@ -977,4 +969,18 @@ public class match {
}
}
public static void createDebugHUD(){
coordP1 = new UIElementText("objP1: " + objP1.getXPos() + ":" + objP1.getYPos() + " P1: " + p1.getPosX() +":" + p1.getPosY(), 5f, 0f, 0.15f, 70f, engine);
coordP1.setBackground(new Vector3f(0f,0f,0f));
engine.add_uiElement(coordP1);
coordP2 = new UIElementText("objP2: " + objP2.getXPos() + ":" + objP2.getYPos() + " P1: " + p2.getPosX() +":" + p2.getPosY(), 5f, 0f, 0.1f, 70f, engine);
coordP2.setBackground(new Vector3f(0f,0f,0f));
engine.add_uiElement(coordP2);
// FPS counter
fpsCounter = new UIElementText("Boulevard Combattant", 5f, 0f, 0.04f, 100f, engine);
fpsCounter.setBackground(new Vector3f(0f,0f,0f));
engine.add_uiElement(fpsCounter);
debugMode = true;
}
}