149 lines
3.9 KiB
Java
149 lines
3.9 KiB
Java
package gameplay.frames;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import gameplay.hitboxes.*;
|
|
|
|
/**
|
|
* Main class for frames
|
|
* @author Victor Azra
|
|
*
|
|
*/
|
|
public class Frame {
|
|
|
|
private Double move_y;
|
|
private Double move_x;
|
|
private ArrayList<Passive_HitBox> passHitBox;
|
|
private ArrayList<Active_HitBox> actHitBox;
|
|
private ArrayList<Passive_throw_HitBox> passThrowHitBox;
|
|
private ArrayList<Active_throw_Hitbox> actThrowHitBox;
|
|
private Push_HitBox pushHitBox;
|
|
private boolean normalCancellable;
|
|
private boolean specialCancellable;
|
|
private boolean jumpCancellable;
|
|
private boolean moveCancellable;
|
|
private boolean isDashCancellable;
|
|
|
|
public Frame() {
|
|
this.setMove_y(0.0);
|
|
this.setMove_x(0.0);
|
|
this.setPassHitBox(new ArrayList<Passive_HitBox>());
|
|
this.setActHitBox(new ArrayList<Active_HitBox>());
|
|
this.setPassThrowHitBox(new ArrayList<Passive_throw_HitBox>());
|
|
this.setActThrowHitBox(new ArrayList<Active_throw_Hitbox>());
|
|
this.setPushHitBox(new Push_HitBox());
|
|
this.normalCancellable = true;
|
|
this.specialCancellable = true;
|
|
this.jumpCancellable = true;
|
|
this.moveCancellable = true;
|
|
this.isDashCancellable = true;
|
|
}
|
|
|
|
public Frame(Double move_y, Double move_x, ArrayList<Passive_HitBox> passHitBox, ArrayList<Active_HitBox> actHitBox,
|
|
ArrayList<Passive_throw_HitBox> passThrowHitBox, ArrayList<Active_throw_Hitbox> actThrowHitBox,
|
|
Push_HitBox pushHitBox, boolean normalCancellable, boolean specialCancellable, boolean jumpCancellable,
|
|
boolean moveCancellable, boolean isDashCancellable) {
|
|
this.setMove_y(move_y);
|
|
this.setMove_x(move_x);
|
|
this.setPassHitBox(passHitBox);
|
|
this.setActHitBox(actHitBox);
|
|
this.setPassThrowHitBox(passThrowHitBox);
|
|
this.setActThrowHitBox(actThrowHitBox);
|
|
this.setPushHitBox(pushHitBox);
|
|
this.normalCancellable = normalCancellable;
|
|
this.specialCancellable = specialCancellable;
|
|
this.jumpCancellable = jumpCancellable;
|
|
this.moveCancellable = moveCancellable;
|
|
this.isDashCancellable = isDashCancellable;
|
|
}
|
|
|
|
/*
|
|
* Mainly use for projectiles
|
|
*/
|
|
public Frame(Double move_y, Double move_x, ArrayList<Passive_HitBox> passHitBox, ArrayList<Active_HitBox> actHitBox) {
|
|
this.setMove_y(move_y);
|
|
this.setMove_x(move_x);
|
|
this.setPassHitBox(passHitBox);
|
|
this.setActHitBox(actHitBox);
|
|
this.setPassThrowHitBox(new ArrayList<Passive_throw_HitBox>());
|
|
this.setActThrowHitBox(new ArrayList<Active_throw_Hitbox>());
|
|
this.setPushHitBox(new Push_HitBox());
|
|
}
|
|
|
|
public boolean isNormalCancellable() {
|
|
return normalCancellable;
|
|
}
|
|
|
|
public boolean isSpecialCancellable() {
|
|
return specialCancellable;
|
|
}
|
|
|
|
public boolean isJumpCancellable() {
|
|
return jumpCancellable;
|
|
}
|
|
|
|
public boolean isMoveCancellable() {
|
|
return moveCancellable;
|
|
}
|
|
|
|
public boolean isDashCancellable() {
|
|
return isDashCancellable;
|
|
}
|
|
|
|
public Double getMove_y() {
|
|
return move_y;
|
|
}
|
|
|
|
public void setMove_y(Double move_y) {
|
|
this.move_y = move_y;
|
|
}
|
|
|
|
public Double getMove_x() {
|
|
return move_x;
|
|
}
|
|
|
|
public void setMove_x(Double move_x) {
|
|
this.move_x = move_x;
|
|
}
|
|
|
|
public ArrayList<Passive_HitBox> getPassHitBox() {
|
|
return passHitBox;
|
|
}
|
|
|
|
public void setPassHitBox(ArrayList<Passive_HitBox> passHitBox) {
|
|
this.passHitBox = passHitBox;
|
|
}
|
|
|
|
public ArrayList<Active_HitBox> getActHitBox() {
|
|
return actHitBox;
|
|
}
|
|
|
|
public void setActHitBox(ArrayList<Active_HitBox> actHitBox) {
|
|
this.actHitBox = actHitBox;
|
|
}
|
|
|
|
public ArrayList<Passive_throw_HitBox> getPassThrowHitBox() {
|
|
return passThrowHitBox;
|
|
}
|
|
|
|
public void setPassThrowHitBox(ArrayList<Passive_throw_HitBox> passThrowHitBox) {
|
|
this.passThrowHitBox = passThrowHitBox;
|
|
}
|
|
|
|
public ArrayList<Active_throw_Hitbox> getActThrowHitBox() {
|
|
return actThrowHitBox;
|
|
}
|
|
|
|
public void setActThrowHitBox(ArrayList<Active_throw_Hitbox> actThrowHitBox) {
|
|
this.actThrowHitBox = actThrowHitBox;
|
|
}
|
|
|
|
public Push_HitBox getPushHitBox() {
|
|
return pushHitBox;
|
|
}
|
|
|
|
public void setPushHitBox(Push_HitBox pushHitBox) {
|
|
this.pushHitBox = pushHitBox;
|
|
}
|
|
}
|