Main Gameplay Loop done.
Only Missing Throws and Projectile handling. Need to be fused with engine.
This commit is contained in:
@ -10,6 +10,7 @@ public class attackPart {
|
||||
private double knockbackOnHit, knockbackOnBlock;
|
||||
private Frame[] frames;
|
||||
private boolean hasHit;
|
||||
private boolean isOverHead, isLow, knocksDown;
|
||||
|
||||
/**
|
||||
* Constructor with most parameters for an attack part, generally a hit
|
||||
@ -20,8 +21,11 @@ public class attackPart {
|
||||
* @param knockbackOnHit the distance the enemy gets moved back if hit
|
||||
* @param knockbackOnBlock the distance the enemy gets moved back if blocked
|
||||
* @param frames the array of frames for the part
|
||||
* @param isLow whether or not the hit hits low
|
||||
* @param isOverHead whether or not the hit is an overhead
|
||||
* @param knocksDown whether or not the hit knocks down
|
||||
*/
|
||||
public attackPart(int damage, int chipDamage, int hitstun, int blockstun, double knockbackOnHit, double knockbackOnBlock, Frame[] frames) {
|
||||
public attackPart(int damage, int chipDamage, int hitstun, int blockstun, double knockbackOnHit, double knockbackOnBlock, Frame[] frames, boolean isLow, boolean isOverHead, boolean knocksDown) {
|
||||
this.damage = damage;
|
||||
this.chipDamage = chipDamage;
|
||||
this.hitstun = hitstun;
|
||||
@ -31,6 +35,9 @@ public class attackPart {
|
||||
this.frames = frames;
|
||||
if(this.frames.length >= 1) {this.frames[this.frames.length-1].setLastFrameOfHit(true);}
|
||||
this.hasHit = false;
|
||||
this.isLow = isLow;
|
||||
this.isOverHead = isOverHead;
|
||||
this.knocksDown = knocksDown;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -48,6 +55,10 @@ public class attackPart {
|
||||
this.knockbackOnBlock = 0.0;
|
||||
this.hasHit = false;
|
||||
if(this.frames.length >= 1) {this.frames[this.frames.length -1].setLastFrameOfHit(true);}
|
||||
this.isLow = false;
|
||||
this.isOverHead = false;
|
||||
this.knocksDown = false;
|
||||
|
||||
}
|
||||
|
||||
public boolean hasHit() {
|
||||
@ -124,4 +135,32 @@ public class attackPart {
|
||||
this.knockbackOnBlock = aP.getKnockbackOnBlock();
|
||||
this.damage = aP.getDamage();
|
||||
}
|
||||
|
||||
public boolean isHasHit() {
|
||||
return hasHit;
|
||||
}
|
||||
|
||||
public boolean isOverHead() {
|
||||
return isOverHead;
|
||||
}
|
||||
|
||||
public void setOverHead(boolean overHead) {
|
||||
isOverHead = overHead;
|
||||
}
|
||||
|
||||
public boolean isLow() {
|
||||
return isLow;
|
||||
}
|
||||
|
||||
public void setLow(boolean low) {
|
||||
isLow = low;
|
||||
}
|
||||
|
||||
public boolean knocksDown() {
|
||||
return knocksDown;
|
||||
}
|
||||
|
||||
public void setKnockDown(boolean knocksDown) {
|
||||
this.knocksDown = knocksDown;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user