Main Gameplay Loop done.

Only Missing Throws and Projectile handling.
Need to be fused with engine.
This commit is contained in:
Azra Victor
2021-06-09 13:14:17 +02:00
committed by no
parent 1ec5cddf3d
commit ed2f49ad0e
9 changed files with 324 additions and 11 deletions

View File

@ -157,5 +157,28 @@ public class Frame {
this.lastFrameOfHit = lastFrameOfHit;
}
//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();}
for(Active_HitBox p: this.actHitBox) {p.reverseHorizontally();}
for(Passive_throw_HitBox p: this.passThrowHitBox) {p.reverseHorizontally();}
for(Active_throw_Hitbox p: this.actThrowHitBox) {p.reverseHorizontally();}
this.pushHitBox.reverseHorizontally();
}
public void clone(Frame f) {
this.setMove_y(f.getMove_y());
this.setMove_x(f.getMove_x());
this.setPassHitBox(f.getPassHitBox());
this.setActHitBox(f.getActHitBox());
this.setPassThrowHitBox(f.getPassThrowHitBox());
this.setActThrowHitBox(f.getActThrowHitBox());
this.setPushHitBox(f.getPushHitBox());
this.normalCancellable = f.isNormalCancellable();
this.specialCancellable = f.isSpecialCancellable();
this.jumpCancellable = f.jumpCancellable;
this.moveCancellable = f.isMoveCancellable();
this.isDashCancellable = f.isDashCancellable;
this.lastFrameOfHit = islastFrameOfHit();
}
}

View File

@ -67,4 +67,5 @@ public class nextFrameBuffer {
this.next.addFrameToQueue(f);
}
}
}