Added some more frames for Blue.
Updated Action constructors.
This commit is contained in:
parent
10b3b60598
commit
f56c84ef8e
2
pom.xml
2
pom.xml
@ -34,7 +34,7 @@
|
||||
<properties>
|
||||
|
||||
<lwjgl.version>3.2.3</lwjgl.version>
|
||||
<lwjgl.natives>natives-windows</lwjgl.natives>
|
||||
<lwjgl.natives>natives-linux</lwjgl.natives>
|
||||
<javafx.version>11</javafx.version>
|
||||
|
||||
</properties>
|
||||
|
@ -39,6 +39,11 @@ public class BlueBaseFrames {
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
protected static Frame[] blueStandFrames() {
|
||||
Frame[] sf = {generateStandFrame1(),generateStandFrame2()};
|
||||
return sf;
|
||||
}
|
||||
|
||||
private static Frame generateCrouchFrame1(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
@ -49,10 +54,15 @@ public class BlueBaseFrames {
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(112,0,112,120);
|
||||
blueStandframe1.setSpriteWrap(112,120,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
protected static Frame[] blueCrouchFrames() {
|
||||
Frame[] cF = {generateCrouchFrame1()};
|
||||
return cF;
|
||||
}
|
||||
|
||||
private static Frame generateNeutralJumpFrame1(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
@ -81,6 +91,17 @@ public class BlueBaseFrames {
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
protected static Frame[] blueNeutralJump() {
|
||||
Frame[] jF = new Frame[40];
|
||||
for(int i = 0; i < jF.length/2; i++) {
|
||||
jF[i] = generateNeutralJumpFrame1();
|
||||
}
|
||||
for(int i = jF.length/2; i < jF.length; i++) {
|
||||
jF[i] = generateNeutralJumpFrame2();
|
||||
}
|
||||
return jF;
|
||||
}
|
||||
|
||||
private static Frame GenerateForwardJumpFrame1(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
@ -109,6 +130,17 @@ public class BlueBaseFrames {
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
protected static Frame[] blueForwardJump() {
|
||||
Frame[] jF = new Frame[40];
|
||||
for(int i = 0; i < jF.length/2; i++) {
|
||||
jF[i] = GenerateForwardJumpFrame1();
|
||||
}
|
||||
for(int i = jF.length/2; i < jF.length; i++) {
|
||||
jF[i] = GenerateForwardJumpFrame2();
|
||||
}
|
||||
return jF;
|
||||
}
|
||||
|
||||
private static Frame BackJumpFrame1(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
@ -123,6 +155,17 @@ public class BlueBaseFrames {
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
protected static Frame[] blueBackJump() {
|
||||
Frame[] jF = new Frame[40];
|
||||
for(int i = 0; i < jF.length/2; i++) {
|
||||
jF[i] = BackJumpFrame1();
|
||||
}
|
||||
for(int i = jF.length/2; i < jF.length; i++) {
|
||||
jF[i] = BackJumpFrame2();
|
||||
}
|
||||
return jF;
|
||||
}
|
||||
|
||||
private static Frame BackJumpFrame2(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
@ -137,6 +180,138 @@ public class BlueBaseFrames {
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
private static Frame walkForwardFrame1(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
phb.add(bStandPHB1);
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(220,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
private static Frame walkForwardFrame2(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
phb.add(bStandPHB1);
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(330,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
private static Frame walkForwardFrame3(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
phb.add(bStandPHB1);
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(420,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
private static Frame walkForwardFrame4(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
phb.add(bStandPHB1);
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(500,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
protected static Frame[] blueFWalk() {
|
||||
Frame[] f = new Frame[4];
|
||||
f[0] = walkForwardFrame1();
|
||||
f[1] = walkForwardFrame2();
|
||||
f[2] = walkForwardFrame3();
|
||||
f[3] = walkForwardFrame4();
|
||||
return f;
|
||||
}
|
||||
|
||||
|
||||
private static Frame walkBackFrame4(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
phb.add(bStandPHB1);
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,-8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(220,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
private static Frame walkBackFrame3(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
phb.add(bStandPHB1);
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,-8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(330,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
private static Frame walkBackFrame2(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
phb.add(bStandPHB1);
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,-8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(420,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
private static Frame walkBackFrame1(){
|
||||
Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
phb.add(bStandPHB1);
|
||||
pthb.add(bStandPTHB1);
|
||||
Frame blueStandframe1 = new Frame(0.0,-8.0,phb,new ArrayList<Active_HitBox>(),pthb,new ArrayList<Active_throw_Hitbox>(),
|
||||
bStandPB1,true,true,true,true,true);
|
||||
blueStandframe1.setSpriteWrap(500,0,112,120);
|
||||
return blueStandframe1;
|
||||
}
|
||||
|
||||
protected static Frame[] blueBWalk() {
|
||||
Frame[] f = new Frame[4];
|
||||
f[0] = walkBackFrame1();
|
||||
f[1] = walkBackFrame2();
|
||||
f[2] = walkBackFrame3();
|
||||
f[3] = walkBackFrame4();
|
||||
return f;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
Engine engine = new Engine(640, 480, new Vector3f(4.0f, 3.0f));
|
||||
engine.init();
|
||||
|
@ -1,9 +1,22 @@
|
||||
package gameplay.Characters.Blue;
|
||||
|
||||
import gameplay.actions.Jump;
|
||||
import gameplay.entities.Character;
|
||||
import gameplay.frames.Frame;
|
||||
import gameplay.Characters.Blue.BlueBaseFrames;
|
||||
|
||||
import static gameplay.input.ButtonIG.*;
|
||||
|
||||
public class CharacterBlue {
|
||||
public Character generateCharBlue(){
|
||||
public static Character generateCharBlue(){
|
||||
Frame[] standF = BlueBaseFrames.blueStandFrames();
|
||||
Frame[] crouchF = BlueBaseFrames.blueCrouchFrames();
|
||||
Frame[] nJumpF = BlueBaseFrames.blueNeutralJump();
|
||||
Frame[] fJumpF = BlueBaseFrames.blueForwardJump();
|
||||
Frame[] bJumpF = BlueBaseFrames.blueBackJump();
|
||||
Frame[] fWalkF = BlueBaseFrames.blueFWalk();
|
||||
Frame[] bWalkF = BlueBaseFrames.blueBWalk();
|
||||
|
||||
return new Character();
|
||||
}
|
||||
}
|
||||
|
@ -10,24 +10,31 @@ public class Attack implements Action {
|
||||
/**
|
||||
* Defines if the attack is a special one (E.G. a fireball) or a normal one (a punch)
|
||||
*/
|
||||
private static boolean isSpecial;
|
||||
private boolean isSpecial;
|
||||
|
||||
private Status requiredStatus;
|
||||
|
||||
private static Status requiredStatus;
|
||||
|
||||
|
||||
/**
|
||||
* The suite of Inputs to have the move come out.
|
||||
* For example, a classic fireball would be something like
|
||||
* {{DOWN},{DOWN,RIGHT},{RIGHT},{A}}
|
||||
*/
|
||||
private static ButtonIG[][] command;
|
||||
private ButtonIG[][] command;
|
||||
|
||||
|
||||
/**
|
||||
* The different sections of the attack
|
||||
*/
|
||||
private attackPart[] parts;
|
||||
|
||||
|
||||
public Attack(boolean isSpecial, Status requiredStatus, ButtonIG[][] command, attackPart[] parts) {
|
||||
this.isSpecial = isSpecial;
|
||||
this.requiredStatus = requiredStatus;
|
||||
this.command = command;
|
||||
this.parts = parts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<Frame> getFrame() {
|
||||
ArrayList<Frame> res = new ArrayList<Frame>();
|
||||
@ -47,21 +54,21 @@ public class Attack implements Action {
|
||||
return res;
|
||||
}
|
||||
|
||||
public static boolean isIsSpecial() {
|
||||
return isSpecial;
|
||||
public boolean isIsSpecial() {
|
||||
return this.isSpecial;
|
||||
}
|
||||
|
||||
public static void setIsSpecial(boolean isSpecial) {
|
||||
Attack.isSpecial = isSpecial;
|
||||
public void setIsSpecial(boolean isSpecial) {
|
||||
this.isSpecial = isSpecial;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ButtonIG[][] getCommand() {
|
||||
return command;
|
||||
return this.command;
|
||||
}
|
||||
|
||||
public static void setCommand(ButtonIG[][] command) {
|
||||
Attack.command = command;
|
||||
public void setCommand(ButtonIG[][] command) {
|
||||
this.command = command;
|
||||
}
|
||||
|
||||
public attackPart[] getParts() {
|
||||
@ -72,13 +79,15 @@ public class Attack implements Action {
|
||||
this.parts = parts;
|
||||
}
|
||||
|
||||
public static Status getRequiredStatus() {
|
||||
return requiredStatus;
|
||||
public Status getRequiredStatus() {
|
||||
return this.requiredStatus;
|
||||
}
|
||||
|
||||
public static void setRequiredStatus(Status requiredStatus) {
|
||||
Attack.requiredStatus = requiredStatus;
|
||||
public void setRequiredStatus(Status requiredStatus) {
|
||||
this.requiredStatus = requiredStatus;
|
||||
}
|
||||
|
||||
public boolean isSpecial() {return this.isSpecial();}
|
||||
|
||||
|
||||
}
|
||||
|
@ -11,11 +11,11 @@ public class Dash implements Action {
|
||||
* For example, a Front Dash would be something like
|
||||
* {{FORWARD},{FORWARD}}
|
||||
*/
|
||||
private static ButtonIG[][] command;
|
||||
private ButtonIG[][] command;
|
||||
|
||||
private Frame[] frames;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ArrayList<Frame> getFrame() {
|
||||
ArrayList<Frame> res = new ArrayList<Frame>();
|
||||
@ -27,7 +27,11 @@ public class Dash implements Action {
|
||||
|
||||
@Override
|
||||
public ButtonIG[][] getCommand() {
|
||||
return command;
|
||||
return this.command;
|
||||
}
|
||||
|
||||
public Dash(ButtonIG[][] command, Frame[] frames) {
|
||||
this.command = command;
|
||||
this.frames = frames;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ public class Jump implements Action {
|
||||
* For example, a Front Jump would be something like
|
||||
* {{UP,RIGHT}}
|
||||
*/
|
||||
private static ButtonIG[][] command;
|
||||
private ButtonIG[][] command;
|
||||
|
||||
private Frame[] frames;
|
||||
|
||||
@ -27,7 +27,11 @@ public class Jump implements Action {
|
||||
|
||||
@Override
|
||||
public ButtonIG[][] getCommand() {
|
||||
return command;
|
||||
return this.command;
|
||||
}
|
||||
|
||||
public Jump(ButtonIG[][] command, Frame[] frames) {
|
||||
this.command = command;
|
||||
this.frames = frames;
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ public class Throw implements Action {
|
||||
/**
|
||||
* Defines if the throw is a special one (E.G. a Moonsault Press ) or a normal one
|
||||
*/
|
||||
private static boolean isSpecial;
|
||||
private boolean isSpecial;
|
||||
|
||||
/**
|
||||
* The suite of Inputs to have the move come out.
|
||||
@ -52,7 +52,14 @@ public class Throw implements Action {
|
||||
|
||||
@Override
|
||||
public ButtonIG[][] getCommand() {
|
||||
return command;
|
||||
return this.command;
|
||||
}
|
||||
|
||||
public Throw(boolean isSpecial, ThrowPart[] parts) {
|
||||
this.isSpecial = isSpecial;
|
||||
this.parts = parts;
|
||||
}
|
||||
|
||||
public Throw() {
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user