L'image des ombres + sprite_zorder.txt pour ordonner l'agencement des sprites
This commit is contained in:
parent
846716db11
commit
aecb07b227
@ -174,11 +174,6 @@ public class match {
|
||||
objP2.setShadow();
|
||||
engine.add_objectGl(objP2.getShadow());
|
||||
|
||||
System.out.println(objP2.getZPos());
|
||||
System.out.println(objP2.getShadow().getZPos());
|
||||
System.out.println(objP1.getZPos());
|
||||
System.out.println(objP1.getShadow().getZPos());
|
||||
|
||||
if(Joystick1Present) {
|
||||
gamepad1 = new GamepadInput(GLFW_JOYSTICK_1);
|
||||
gamepad1.inputRefresh();
|
||||
@ -191,21 +186,21 @@ public class match {
|
||||
}
|
||||
|
||||
// GUI setup
|
||||
coordP1 = new UIElementText("objP1: " + objP1.getXPos() + ":" + objP1.getYPos() + " P1: " + p1.getPosX() +":" + p1.getPosY(), 5f, 0f, 0.2f, 80f, engine);
|
||||
coordP1 = new UIElementText("objP1: " + objP1.getXPos() + ":" + objP1.getYPos() + " P1: " + p1.getPosX() +":" + p1.getPosY(), 5f, 0f, 0.2f, 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, 80f, engine);
|
||||
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);
|
||||
// Barre de vie
|
||||
healthBarP1Obj = new HorizontalProgressBar(90f, 8.5f, 0.4f, 100f, p1.getCurrentHP(), p1.getMaxHP(), false);
|
||||
healthBarP1Obj = new HorizontalProgressBar(80f, 8.5f, 0.4f, 100f, p1.getCurrentHP(), p1.getMaxHP(), false);
|
||||
healthBarP1 = new UIElement(healthBarP1Obj, 0.01f, 0.990f, engine);
|
||||
healthBarP2Obj = new HorizontalProgressBar(90f, 8.5f, 0.4f, 100f, p2.getCurrentHP(), p2.getMaxHP(), true);
|
||||
healthBarP2Obj = new HorizontalProgressBar(80f, 8.5f, 0.4f, 100f, p2.getCurrentHP(), p2.getMaxHP(), true);
|
||||
healthBarP2 = new UIElement(healthBarP2Obj, 0.565f, 0.990f, engine);
|
||||
engine.add_uiElement(healthBarP1);
|
||||
engine.add_uiElement(healthBarP2);
|
||||
// Timer
|
||||
timerUI = new UIElementText(timer + "", 10f, 0.45f, 1.0f, 90f, engine);
|
||||
timerUI = new UIElementText(timer + "", 10f, 0.45f, 1.0f, 85f, engine);
|
||||
engine.add_uiElement(timerUI);
|
||||
|
||||
while(frameCount < 5940 && engine.getRunning()) {
|
||||
|
10
src/gameplay/match/sprite_zorder.txt
Normal file
10
src/gameplay/match/sprite_zorder.txt
Normal file
@ -0,0 +1,10 @@
|
||||
0 - Background
|
||||
4 - P1 Shadow
|
||||
5 - P2 Shadow
|
||||
14 - P1
|
||||
15 - P2
|
||||
70 - Affichage des coordonnées
|
||||
80 - Barre de vie
|
||||
81 - Habillage barre de vie
|
||||
85 - Timer
|
||||
90 +
|
BIN
textures/shadow.png
Normal file
BIN
textures/shadow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
Loading…
x
Reference in New Issue
Block a user