correction hitbox qui clignote
This commit is contained in:
parent
03851448f4
commit
11639912ad
@ -251,12 +251,14 @@ public class BlueNormals {
|
||||
Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox pushB = new Push_HitBox(70,70,150,500);
|
||||
// Active_HitBox act1 = new Active_HitBox(70,70,150,500);
|
||||
|
||||
/*
|
||||
adding hitboxes to lists
|
||||
*/
|
||||
phb.add(phb1);
|
||||
pthb.add(pthb1);
|
||||
// ahb.add(act1);
|
||||
|
||||
/*
|
||||
frame creation
|
||||
|
@ -252,5 +252,4 @@ public class BlueSpecials {
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ public class Frame {
|
||||
private boolean moveCancellable;
|
||||
private boolean isDashCancellable;
|
||||
private boolean lastFrameOfHit;
|
||||
private boolean isInverted;
|
||||
/**
|
||||
* an int of 4 that determines the texture wrap for the frame
|
||||
*/
|
||||
@ -164,6 +165,10 @@ public class Frame {
|
||||
this.lastFrameOfHit = lastFrameOfHit;
|
||||
}
|
||||
|
||||
public boolean getIsInverted(){
|
||||
return this.isInverted;
|
||||
}
|
||||
|
||||
//Inverts all hitboxes of the frame horizontally. Used if the character looks to the left instead of the right
|
||||
public void invertHitBoxes() {
|
||||
for(Passive_HitBox p: this.passHitBox) {p.reverseHorizontally();}
|
||||
@ -171,6 +176,7 @@ public class Frame {
|
||||
for(Passive_throw_HitBox p: this.passThrowHitBox) {p.reverseHorizontally();}
|
||||
for(Active_throw_Hitbox p: this.actThrowHitBox) {p.reverseHorizontally();}
|
||||
this.pushHitBox.reverseHorizontally();
|
||||
isInverted = true;
|
||||
}
|
||||
|
||||
public void clone(Frame f) {
|
||||
|
@ -318,6 +318,14 @@ public class match {
|
||||
if(p2.getCurrentframe().islastFrameOfHit()) {
|
||||
p2.removeFirstAttackPart();
|
||||
}
|
||||
|
||||
//Si la frame d'avant est inversé il faut la "nettoyer" pour le prochaine utilisation
|
||||
if (p1.getCurrentframe().getIsInverted()){
|
||||
p1.getCurrentframe().invertHitBoxes();
|
||||
} if (p2.getCurrentframe().getIsInverted()){
|
||||
p2.getCurrentframe().invertHitBoxes();
|
||||
|
||||
}
|
||||
nextFrame(p1,inputsP1);
|
||||
nextFrame(p2,inputsP2);
|
||||
|
||||
@ -358,6 +366,7 @@ public class match {
|
||||
objP1.flipTextureWrapH();
|
||||
}
|
||||
|
||||
|
||||
// Debug Hitbox Management
|
||||
removeHitboxEngine();
|
||||
if (showP1Hitbox){
|
||||
|
Loading…
x
Reference in New Issue
Block a user