Added an attribute for frame

This commit is contained in:
Rémi Rativel 2021-06-08 20:13:21 +02:00
parent 759ea2222d
commit ced29d97b8

View File

@ -23,6 +23,7 @@ public class Frame {
private boolean jumpCancellable;
private boolean moveCancellable;
private boolean isDashCancellable;
private boolean firstFrameOfHit;
public Frame() {
this.setMove_y(0.0);
@ -37,6 +38,7 @@ public class Frame {
this.jumpCancellable = true;
this.moveCancellable = true;
this.isDashCancellable = true;
this.firstFrameOfHit = false;
}
public Frame(Double move_y, Double move_x, ArrayList<Passive_HitBox> passHitBox, ArrayList<Active_HitBox> actHitBox,
@ -55,6 +57,7 @@ public class Frame {
this.jumpCancellable = jumpCancellable;
this.moveCancellable = moveCancellable;
this.isDashCancellable = isDashCancellable;
this.firstFrameOfHit = false;
}
/*
@ -145,4 +148,12 @@ public class Frame {
public void setPushHitBox(Push_HitBox pushHitBox) {
this.pushHitBox = pushHitBox;
}
public boolean isFirstFrameOfHit() {
return firstFrameOfHit;
}
public void setFirstFrameOfHit(boolean firstFrameOfHit) {
this.firstFrameOfHit = firstFrameOfHit;
}
}