reverse adjusted for size 5 sprite
This commit is contained in:
parent
ebf4c198ad
commit
32e1810352
@ -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;
|
||||
}
|
||||
}
|
0
src/gameplay/match/.gitignore
vendored
0
src/gameplay/match/.gitignore
vendored
@ -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<Hitbox> 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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user