From 32e18103529a7e6b57451ca56d109742d8411498 Mon Sep 17 00:00:00 2001 From: Antoine Date: Sun, 20 Jun 2021 19:01:16 +0200 Subject: [PATCH] reverse adjusted for size 5 sprite --- src/gameplay/hitboxes/HitBox.java | 2 +- src/gameplay/match/.gitignore | 0 src/gameplay/match/match.java | 11 ++++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 src/gameplay/match/.gitignore diff --git a/src/gameplay/hitboxes/HitBox.java b/src/gameplay/hitboxes/HitBox.java index 56515ce..c0e12e4 100644 --- a/src/gameplay/hitboxes/HitBox.java +++ b/src/gameplay/hitboxes/HitBox.java @@ -99,7 +99,7 @@ public class HitBox { } public void reverseHorizontally() { - this.position_x = 138*4 - position_x; + this.position_x = 138*5 - position_x; this.size_x = -this.size_x; } } \ No newline at end of file diff --git a/src/gameplay/match/.gitignore b/src/gameplay/match/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/src/gameplay/match/match.java b/src/gameplay/match/match.java index 8c6f634..44e52b7 100644 --- a/src/gameplay/match/match.java +++ b/src/gameplay/match/match.java @@ -84,7 +84,7 @@ public class match { private static boolean showP1Hitbox = true; // TODO modifier pour le rendre activable private static boolean showP2Hitbox = true; private static List listHitboxObj = new ArrayList<>(); - private static float slowFactor = 0.5f; + private static float slowFactor = 1f; private static Sprite objP1,objP2; private static Engine engine; @@ -207,7 +207,9 @@ public class match { healthBarP1Obj.useTime = true; healthBarP1 = new UIElement(healthBarP1Obj, 0.0138f, 0.980f, engine); healthBarP2Obj = new HorizontalProgressBar(80f, 8.5f, 0.4f, 100f, p2.getCurrentHP(), p2.getMaxHP(), true); - healthBarP2Obj.setColorVerticalGradient(new Vector3f(39f/255f, 201f/255f, 30f/255f), new Vector3f(19f/255f, 89f/255f, 15f/255f)); + healthBarP2Obj.setShader("shaders/StylishShaders/BasicNoTexVert.glsl", "shaders/StylishShaders/HorizontalProgressBarGradientSquareFrag.glsl"); + healthBarP2Obj.setUseHeight(true); + healthBarP2Obj.useTime = true; healthBarP2 = new UIElement(healthBarP2Obj, 0.563f, 0.980f, engine); engine.add_uiElement(healthBarP1); engine.add_uiElement(healthBarP2); @@ -624,7 +626,10 @@ public class match { c.setStatus(Status.NORMAL); if(in.getLatestInputs().containsInput(ButtonIG.DOWN)) { c.addNextFrames(c.getDefaultCrouchingFrames()); - } else {c.addNextFrames(c.getDefaultStandingFrames());} + } + else { + c.addNextFrames(c.getDefaultStandingFrames()); + } break; } }