From aecb07b227fbfcd84966e7a3715b9794db5a3bb8 Mon Sep 17 00:00:00 2001 From: Antoine Date: Wed, 16 Jun 2021 23:45:52 +0200 Subject: [PATCH] L'image des ombres + sprite_zorder.txt pour ordonner l'agencement des sprites --- src/gameplay/match/match.java | 15 +++++---------- src/gameplay/match/sprite_zorder.txt | 10 ++++++++++ textures/shadow.png | Bin 0 -> 4959 bytes 3 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 src/gameplay/match/sprite_zorder.txt create mode 100644 textures/shadow.png diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index 196692a..685a503 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -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()) { diff --git a/src/gameplay/match/sprite_zorder.txt b/src/gameplay/match/sprite_zorder.txt new file mode 100644 index 0000000..73d255e --- /dev/null +++ b/src/gameplay/match/sprite_zorder.txt @@ -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 + \ No newline at end of file diff --git a/textures/shadow.png b/textures/shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..65c440c88d5a6920fba24507344de36ff5f804a7 GIT binary patch literal 4959 zcmV-l6QJygP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv00000008+zyMF)x010qNS#tmY3labT3lag+-G2N4020GVL_t(|+U;H0cH_7X zgzfZl@Bja6PbX144-+KiQemMi@5VVgl4V(x8a)TE<0nl+ij+4 z+N)!}mcR4Qk3x3^fOAOqy#eHA0Z>Wyxkzc6TcVdsH(->I*$WxJF|+*<-`^Eoy#`po zWM|+;oU4wV6aa=maVy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