From ced29d97b8419586e0012f2174394bde140431ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rativel?= Date: Tue, 8 Jun 2021 20:13:21 +0200 Subject: [PATCH] Added an attribute for frame --- src/gameplay/frames/Frame.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gameplay/frames/Frame.java b/src/gameplay/frames/Frame.java index 1c35642..a6161b1 100644 --- a/src/gameplay/frames/Frame.java +++ b/src/gameplay/frames/Frame.java @@ -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 passHitBox, ArrayList 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; + } }