Hit Handling. Unfinished.

This commit is contained in:
no
2021-06-09 02:14:51 +02:00
parent ced29d97b8
commit 1ec5cddf3d
6 changed files with 142 additions and 19 deletions

View File

@ -23,7 +23,7 @@ public class Frame {
private boolean jumpCancellable;
private boolean moveCancellable;
private boolean isDashCancellable;
private boolean firstFrameOfHit;
private boolean lastFrameOfHit;
public Frame() {
this.setMove_y(0.0);
@ -38,7 +38,7 @@ public class Frame {
this.jumpCancellable = true;
this.moveCancellable = true;
this.isDashCancellable = true;
this.firstFrameOfHit = false;
this.lastFrameOfHit = false;
}
public Frame(Double move_y, Double move_x, ArrayList<Passive_HitBox> passHitBox, ArrayList<Active_HitBox> actHitBox,
@ -57,7 +57,7 @@ public class Frame {
this.jumpCancellable = jumpCancellable;
this.moveCancellable = moveCancellable;
this.isDashCancellable = isDashCancellable;
this.firstFrameOfHit = false;
this.lastFrameOfHit = false;
}
/*
@ -149,11 +149,13 @@ public class Frame {
this.pushHitBox = pushHitBox;
}
public boolean isFirstFrameOfHit() {
return firstFrameOfHit;
public boolean islastFrameOfHit() {
return lastFrameOfHit;
}
public void setFirstFrameOfHit(boolean firstFrameOfHit) {
this.firstFrameOfHit = firstFrameOfHit;
public void setLastFrameOfHit(boolean lastFrameOfHit) {
this.lastFrameOfHit = lastFrameOfHit;
}
}