Merge remote-tracking branch 'origin/master'
# Conflicts: # src/gameplay/Characters/Blue/BlueNormals.java
This commit is contained in:
@ -28,6 +28,7 @@ public class Engine {
|
||||
|
||||
private final int width;
|
||||
private final int height;
|
||||
private final boolean fullscreen;
|
||||
|
||||
private float viewXPos;
|
||||
private float viewYPos;
|
||||
@ -45,7 +46,7 @@ public class Engine {
|
||||
* Initial projection is -1000;1000 in width and -1000*aspectRatio; 1000*aspectRatio
|
||||
* Initial Camera position is (0, 0, -1) //TODO vérifiez
|
||||
*/
|
||||
public Engine(int width, int height, Vector3f aspectRatio) {
|
||||
public Engine(int width, int height, boolean fullscreen, Vector3f aspectRatio) {
|
||||
this.running = false;
|
||||
this.objectsGl = new ArrayList<>();
|
||||
this.uiElements = new ArrayList<>();
|
||||
@ -57,6 +58,7 @@ public class Engine {
|
||||
ObjectGl.view = Matrix4f.translate(new Vector3f(0.0f, 0.0f, 1.0f));
|
||||
this.transformationView = new Vector3f();
|
||||
this.tracking = null;
|
||||
this.fullscreen = fullscreen;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,7 +81,11 @@ public class Engine {
|
||||
|
||||
int width = this.width;
|
||||
int height = this.height;
|
||||
this.setWindow(glfwCreateWindow(width, height, "Boulevard Combattant", NULL, NULL));
|
||||
if (fullscreen) {
|
||||
this.setWindow(glfwCreateWindow(width, height, "Boulevard Combattant", glfwGetPrimaryMonitor(), NULL));
|
||||
} else {
|
||||
this.setWindow(glfwCreateWindow(width, height, "Boulevard Combattant", NULL, NULL));
|
||||
}
|
||||
assert getWindow() != NULL;
|
||||
|
||||
// On récupère les informations du moniteur principal
|
||||
|
@ -36,7 +36,7 @@ public class TestEngine {
|
||||
/*
|
||||
Engine Init
|
||||
*/
|
||||
Engine engine = new Engine(1280, 720, new Vector3f(4.0f, 3.0f));
|
||||
Engine engine = new Engine(1280, 720, false, new Vector3f(4.0f, 3.0f));
|
||||
int speed = 10; //vitesse d<>placement Object
|
||||
engine.init();
|
||||
|
||||
|
@ -748,7 +748,7 @@ public class BlueBaseFrames {
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
Engine engine = new Engine(640, 480, new Vector3f(4.0f, 3.0f));
|
||||
Engine engine = new Engine(640, 480, false, new Vector3f(4.0f, 3.0f));
|
||||
engine.init();
|
||||
|
||||
Vector3f BLUE = new Vector3f(0f,0f,1f); //passive_hit
|
||||
|
@ -147,7 +147,7 @@ public class BlueNormals {
|
||||
return(new attackPart(15,0,4,4,8,3,f,false,false,false));
|
||||
}
|
||||
|
||||
public static Attack blueCrouchJab() {
|
||||
protected static Attack blueCrouchJab() {
|
||||
ButtonIG[][] cmd = {{DOWN,A}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
@ -334,14 +334,280 @@ public class BlueNormals {
|
||||
return(new attackPart(90,0,13,29,12,5,f,false,false,false));
|
||||
}
|
||||
|
||||
public static Attack blueCrouchFierce() {
|
||||
protected static Attack blueCrouchFierce() {
|
||||
ButtonIG[][] cmd = {{DOWN,C}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
attackPart[] parts = {blueCrouchCstartup(),blueCrouchCactive(),blueCrouchCrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
|
||||
private static Frame crouchBFrame1() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*2),0,138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame crouchBFrame2() {
|
||||
//movement data
|
||||
double moveX = 8.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*4),(138*14),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame crouchBFrame3() {
|
||||
//movement data
|
||||
double moveX = 8.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*2),0,138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static attackPart blueCrouchBstartup() {
|
||||
Frame[] f = new Frame[3];
|
||||
f[0] = crouchBFrame1();
|
||||
f[1] = crouchBFrame1();
|
||||
f[2] = crouchBFrame1();
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueCrouchBrecovery() {
|
||||
Frame[] f = new Frame[4];
|
||||
f[0] = crouchBFrame3();
|
||||
f[1] = crouchBFrame3();
|
||||
f[2] = crouchBFrame3();
|
||||
f[3] = crouchBFrame3();
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueCrouchBactive() {
|
||||
Frame[] f = new Frame[4];
|
||||
f[0] = crouchBFrame2();
|
||||
f[1] = crouchBFrame2();
|
||||
f[2] = crouchBFrame2();
|
||||
f[3] = crouchBFrame2();
|
||||
return(new attackPart(15,0,9,8,10,5,f,false,false,false));
|
||||
}
|
||||
|
||||
protected static Attack blueCrouchShort() {
|
||||
ButtonIG[][] cmd = {{DOWN,B}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
attackPart[] parts = {blueCrouchBstartup(),blueCrouchBactive(),blueCrouchBrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
private static Frame crouchDFrame1() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = true;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*7),(138*5),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame crouchDFrame2() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*7),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame crouchDFrame3() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*7),(138*7),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame crouchDFrame4() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*7),(138*8),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static attackPart blueCrouchDstartup() {
|
||||
Frame[] f = new Frame[4];
|
||||
f[0] = crouchDFrame1();
|
||||
f[1] = crouchDFrame1();
|
||||
f[2] = crouchDFrame1();
|
||||
f[3] = crouchDFrame1();
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueCrouchDrecovery() {
|
||||
Frame[] f = new Frame[25];
|
||||
for(int i = 0; i < 15; i++) {
|
||||
f[i] = crouchDFrame3();
|
||||
}
|
||||
for(int i = 15; i < f.length; i++) {
|
||||
f[i] = crouchDFrame4();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueCrouchDactive() {
|
||||
Frame[] f = new Frame[6];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = crouchAFrame2();
|
||||
}
|
||||
return(new attackPart(120,0,31,10,30,15,f,true,false,true));
|
||||
}
|
||||
|
||||
protected static Attack blueCrouchRoundHouse() {
|
||||
ButtonIG[][] cmd = {{DOWN,D}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
attackPart[] parts = {blueCrouchDstartup(),blueCrouchDactive(),blueCrouchDrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
protected static Frame standAFrame1(){
|
||||
|
||||
/*
|
||||
@ -469,7 +735,7 @@ public class BlueNormals {
|
||||
return(new attackPart(80,0,4,4,8,3,f,false,false,false));
|
||||
}
|
||||
|
||||
public static Attack blueStandJab() {
|
||||
protected static Attack blueStandJab() {
|
||||
ButtonIG[][] cmd = {{A}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
@ -477,6 +743,153 @@ public class BlueNormals {
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
private static Frame StandCFrame1() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap(0,0,138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame StandCFrame2() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = true;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*3),(138*2),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame StandCFrame3() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap(138,(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame StandCFrame4() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = true;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox pB1 = new Push_HitBox(200,-150,160,400);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap(138,(138*7),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static attackPart blueStandCstartup() {
|
||||
Frame[] f = new Frame[6];
|
||||
for(int i = 0; i < 3; i++) {
|
||||
f[i] = StandCFrame1();
|
||||
}
|
||||
for(int i = 3; i < 6; i++) {
|
||||
f[i] = StandCFrame2();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueStandCrecovery() {
|
||||
Frame[] f = new Frame[22];
|
||||
for(int i = 0; i < 22; i++) {
|
||||
f[i] = StandCFrame4();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueStandCactive() {
|
||||
Frame[] f = new Frame[6];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = StandCFrame3();
|
||||
}
|
||||
return(new attackPart(100,0,28,14,10,5,f,false,false,false));
|
||||
}
|
||||
|
||||
protected static Attack blueStandFierce() {
|
||||
ButtonIG[][] cmd = {{C}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
attackPart[] parts = {blueStandCstartup(),blueStandCactive(),blueStandCrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
protected static Frame standDFrame1(){
|
||||
|
||||
/*
|
||||
@ -643,6 +1056,39 @@ public class BlueNormals {
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame standDFrame5(){
|
||||
|
||||
/*
|
||||
Hitboxes lists creation
|
||||
*/
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
|
||||
/*
|
||||
Individual hitboxes creation
|
||||
*/
|
||||
Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500);
|
||||
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100);
|
||||
Push_HitBox pushB = new Push_HitBox(70,70,150,500);
|
||||
|
||||
/*
|
||||
adding hitboxes to lists
|
||||
*/
|
||||
phb.add(phb1);
|
||||
pthb.add(pthb1);
|
||||
|
||||
/*
|
||||
frame creation
|
||||
*/
|
||||
Frame f = new Frame(0.0,3.0,phb,ahb,pthb,athb,pushB,
|
||||
//cancels (in order : normal, special, jump, move, dash)
|
||||
false,false,false,false,false);
|
||||
f.setSpriteWrap((138*4),0,138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
protected static attackPart blueStandDstartup() {
|
||||
Frame[] f = new Frame[8];
|
||||
for(int i = 0; i < 5; i++) {
|
||||
@ -664,20 +1110,142 @@ public class BlueNormals {
|
||||
|
||||
protected static attackPart blueStandDrecovery() {
|
||||
Frame[] f = new Frame[18];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
for(int i = 0; i < 10; i++) {
|
||||
f[i] = standDFrame4();
|
||||
}
|
||||
for(int i = 10; i < f.length; i++) {
|
||||
f[i] = standDFrame5();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
public static Attack blueStandHeavyKick() {
|
||||
protected static Attack blueStandHeavyKick() {
|
||||
ButtonIG[][] cmd = {{D}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
attackPart[] parts = {blueStandDstartup(),blueStandDactive(),blueStandDrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
protected static Frame ForwardDFrame0() {
|
||||
|
||||
private static Frame StandBFrame1() {
|
||||
//movement data
|
||||
double moveX = 3.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = true;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*5),(138*5),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame StandBFrame2() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = true;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*6),(138*5),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame StandBFrame3() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = true;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*7),(138*5),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static attackPart blueStandBstartup() {
|
||||
Frame[] f = new Frame[6];
|
||||
for(int i = 0; i < 6; i++) {
|
||||
f[i] = StandBFrame1();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueStandBactive() {
|
||||
Frame[] f = new Frame[6];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = StandBFrame2();
|
||||
}
|
||||
return(new attackPart(80,0,11,8,8,5,f,false,false,false));
|
||||
}
|
||||
|
||||
private static attackPart blueStandBrecovery() {
|
||||
Frame[] f = new Frame[4];
|
||||
for(int i = 0; i < 4; i++) {
|
||||
f[i] = StandBFrame3();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
protected static Attack blueStandShort() {
|
||||
ButtonIG[][] cmd = {{B}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
attackPart[] parts = {blueStandBstartup(),blueStandBactive(),blueStandBrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static Frame ForwardDFrame0() {
|
||||
//movement data
|
||||
double moveX = 3.0;
|
||||
double moveY = 0.0;
|
||||
@ -885,7 +1453,7 @@ public class BlueNormals {
|
||||
return(new attackPart(70,0,11,3,8.0,4.0,f,false,true,false));
|
||||
}
|
||||
|
||||
public static Attack blueFordwardRoundHouse() {
|
||||
protected static Attack blueFordwardRoundHouse() {
|
||||
ButtonIG[][] cmd = {{FORWARD,D}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.NORMAL;
|
||||
@ -893,4 +1461,467 @@ public class BlueNormals {
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
private static Frame JumpAFrame1() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*12),(138*3),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame JumpAFrame2() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*13),(138*3),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame JumpAFrame3() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = true;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*14),(138*3),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static attackPart blueJumpAstartup() {
|
||||
Frame[] f = new Frame[3];
|
||||
for(int i = 0; i < 3; i++) {
|
||||
f[i] = JumpAFrame1();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueJumpAactive() {
|
||||
Frame[] f = new Frame[4];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpAFrame2();
|
||||
}
|
||||
return(new attackPart(80,0,10,5,8,3,f,false,true,false));
|
||||
}
|
||||
|
||||
private static attackPart blueJumpArecovery() {
|
||||
Frame[] f = new Frame[5];
|
||||
for(int i = 0; i < 5; i++) {
|
||||
f[i] = JumpAFrame3();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
protected static Attack blueJumpJab() {
|
||||
ButtonIG[][] cmd = {{A}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.JUMPING;
|
||||
attackPart[] parts = {blueJumpAstartup(),blueJumpAactive(),blueJumpArecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
private static Frame JumpCFrame1() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*12),(138*3),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame JumpCFrame2() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*13),(138*3),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame JumpCFrame3() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = true;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*14),(138*3),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static attackPart blueJumpCstartup() {
|
||||
Frame[] f = new Frame[4];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpCFrame1();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueJumpCactive() {
|
||||
Frame[] f = new Frame[8];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpCFrame2();
|
||||
}
|
||||
return(new attackPart(115,0,30,5,13,5,f,false,true,false));
|
||||
}
|
||||
|
||||
private static attackPart blueJumpCrecovery() {
|
||||
Frame[] f = new Frame[15];
|
||||
for(int i = 0; i < 15; i++) {
|
||||
f[i] = JumpCFrame3();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
protected static Attack blueJumpFierce() {
|
||||
ButtonIG[][] cmd = {{C}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.JUMPING;
|
||||
attackPart[] parts = {blueJumpCstartup(),blueJumpCactive(),blueJumpCrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
private static Frame JumpBFrame1() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*14),138,138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame JumpBFrame2() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*13),138,138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame JumpBFrame3() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*14),138,138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static attackPart blueJumpBstartup() {
|
||||
Frame[] f = new Frame[3];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpBFrame1();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueJumpBactive() {
|
||||
Frame[] f = new Frame[40];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpBFrame2();
|
||||
}
|
||||
return(new attackPart(80,0,30,15,25,10,f,false,true,false));
|
||||
}
|
||||
|
||||
private static attackPart blueJumpBrecovery() {
|
||||
Frame[] f = new Frame[6];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpBFrame3();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
protected static Attack blueJumpShort() {
|
||||
ButtonIG[][] cmd = {{B}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.JUMPING;
|
||||
attackPart[] parts = {blueJumpBstartup(),blueJumpBactive(),blueJumpBrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
|
||||
private static Frame JumpDFrame1() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = true;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*11),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame JumpDFrame2() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = false;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*10),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame JumpDFrame3() {
|
||||
//movement data
|
||||
double moveX = 0.0;
|
||||
double moveY = 0.0;
|
||||
|
||||
//cancelData
|
||||
boolean normalC = false;
|
||||
boolean specialC = true;
|
||||
boolean jumpC = false;
|
||||
boolean moveC = false;
|
||||
boolean dashC = false;
|
||||
|
||||
//hitbox lists
|
||||
ArrayList<Active_HitBox> ahb = new ArrayList<Active_HitBox>();
|
||||
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
|
||||
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
|
||||
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
|
||||
|
||||
//generate hitboxes here and then use ArrayList add method to add them to the correct list
|
||||
Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500);
|
||||
|
||||
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
|
||||
|
||||
//set sprite data on sheet
|
||||
f.setSpriteWrap((138*11),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static attackPart blueJumpDstartup() {
|
||||
Frame[] f = new Frame[4];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpDFrame1();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
private static attackPart blueJumpDactive() {
|
||||
Frame[] f = new Frame[8];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpDFrame2();
|
||||
}
|
||||
return(new attackPart(115,0,50,20,45,15,f,false,true,false));
|
||||
}
|
||||
|
||||
private static attackPart blueJumpDrecovery() {
|
||||
Frame[] f = new Frame[36];
|
||||
for(int i = 0; i < f.length; i++) {
|
||||
f[i] = JumpDFrame3();
|
||||
}
|
||||
return(new attackPart(f));
|
||||
}
|
||||
|
||||
protected static Attack blueJumpRoundHouse() {
|
||||
ButtonIG[][] cmd = {{D}};
|
||||
boolean isSpecial = false;
|
||||
Status rS = Status.JUMPING;
|
||||
attackPart[] parts = {blueJumpDstartup(),blueJumpDactive(),blueJumpDrecovery()};
|
||||
return new Attack(isSpecial,rS,cmd,parts);
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,10 @@ public class CharacterBlue {
|
||||
Jump nJ = new Jump(njcmd,nJumpF);
|
||||
Jump bJ = new Jump(bjcmd,bJumpF);
|
||||
|
||||
Attack[] atks = {blueLDP(),blueFordwardRoundHouse(),blueCrouchFierce(),blueCrouchJab(),blueStandHeavyKick(),blueStandJab(),blueFordwardRoundHouse()};
|
||||
Attack[] atks = {blueLDP(),blueJumpJab(),blueJumpFierce(),blueJumpShort(),blueJumpRoundHouse(),
|
||||
blueFordwardRoundHouse(),
|
||||
blueCrouchFierce(),blueCrouchJab(),blueCrouchShort(),blueCrouchRoundHouse(),
|
||||
blueStandHeavyKick(),blueStandJab(),blueStandFierce(),blueStandShort()};
|
||||
|
||||
Frame shf = BlueMisc.blueStandHit();
|
||||
Frame chf = BlueMisc.blueCrouchHit();
|
||||
|
@ -94,8 +94,13 @@ public class match {
|
||||
private static Engine engine;
|
||||
private static Frame f;
|
||||
private static int acCode = 0;
|
||||
private static int height, width;
|
||||
private static boolean roundP1=false ;
|
||||
private static boolean roundP1=false;
|
||||
|
||||
// Settings
|
||||
private static int height, width, rounds;
|
||||
private static String character1, character2, stage;
|
||||
private static boolean fullscreen;
|
||||
|
||||
|
||||
/**
|
||||
* Starts a new round, by placing the timer back at base value, characters back at full hp and such.
|
||||
@ -154,6 +159,11 @@ public class match {
|
||||
|
||||
height = Integer.parseInt((String) settings.get("height"));
|
||||
width = Integer.parseInt((String) settings.get("width"));
|
||||
fullscreen = Boolean.parseBoolean((String) settings.get("fullscreen"));
|
||||
rounds = Integer.parseInt((String) settings.get("rounds"));
|
||||
character1 = (String) settings.get("character1");
|
||||
character2 = (String) settings.get("character2");
|
||||
stage = (String) settings.get("stage");
|
||||
} catch (ParseException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -161,7 +171,7 @@ public class match {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
parse();
|
||||
engine = new Engine(width, height, new Vector3f(4.0f, 3.0f));
|
||||
engine = new Engine(width, height, fullscreen, new Vector3f(4.0f, 3.0f));
|
||||
engine.init();
|
||||
|
||||
boolean Joystick1Present = glfwJoystickPresent(GLFW_JOYSTICK_1);
|
||||
|
@ -71,12 +71,19 @@ public class Config {
|
||||
System.out.println("button for up is : " + up); */
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
File f = new File("game.set");
|
||||
try {
|
||||
f.createNewFile();
|
||||
} catch (IOException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
parse();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
System.out.println("Empty config file");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,9 @@ import javafx.collections.ObservableList;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.ChoiceBox;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.control.CheckBox;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
@ -23,6 +26,7 @@ import javafx.fxml.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class Launcher extends Application {
|
||||
|
||||
public static Launcher pointer;
|
||||
@ -45,7 +49,6 @@ public class Launcher extends Application {
|
||||
* Start method is used by Launcher as an implementation of the Application class to create a JavaFX thread to display the GUI window
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
|
||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("launcher.fxml"));
|
||||
@ -72,7 +75,21 @@ public class Launcher extends Application {
|
||||
fs.setSelected(false);
|
||||
}
|
||||
|
||||
VBox v1 = (VBox) namespace.get("p1");
|
||||
ChoiceBox<String> b1 = (ChoiceBox<String>) v1.getChildren().get(1);
|
||||
VBox v2 = (VBox) namespace.get("p2");
|
||||
ChoiceBox<String> b2 = (ChoiceBox<String>) v2.getChildren().get(1);
|
||||
ObservableList<String> availablechar = FXCollections.observableArrayList("Blue");
|
||||
b1.setItems(availablechar);
|
||||
b2.setItems(availablechar);
|
||||
|
||||
if(setter.getChar1().equals("blue")) {
|
||||
b1.setValue("Blue");
|
||||
}
|
||||
|
||||
if(setter.getChar2().equals("blue")) {
|
||||
b2.setValue("Blue");
|
||||
}
|
||||
|
||||
primaryStage.initStyle(StageStyle.UNDECORATED);
|
||||
primaryStage.setTitle("Boulevard Combattant");
|
||||
@ -81,12 +98,10 @@ public class Launcher extends Application {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@FXML
|
||||
public void runGame() {
|
||||
try {
|
||||
int width, height;
|
||||
System.out.println(namespace.size());
|
||||
ChoiceBox<String> cb = (ChoiceBox<String>) namespace.get("resolution");
|
||||
switch (cb.getValue()) {
|
||||
case "640x480":
|
||||
@ -127,8 +142,15 @@ public class Launcher extends Application {
|
||||
CheckBox fs = (CheckBox) namespace.get("fullscreen");
|
||||
pointer.arraysettings.put("fullscreen", fs.isSelected());
|
||||
pointer.arraysettings.put("rounds", 3);
|
||||
pointer.arraysettings.put("character1", "default");
|
||||
pointer.arraysettings.put("character2", "default");
|
||||
|
||||
VBox vp1 = (VBox) namespace.get("p1");
|
||||
ChoiceBox<String> p1 = (ChoiceBox<String>) vp1.getChildren().get(1);
|
||||
pointer.arraysettings.put("character1", p1.getValue().toLowerCase());
|
||||
|
||||
VBox vp2 = (VBox) namespace.get("p2");
|
||||
ChoiceBox<String> p2 = (ChoiceBox<String>) vp2.getChildren().get(1);
|
||||
pointer.arraysettings.put("character2", p2.getValue().toLowerCase());
|
||||
|
||||
pointer.arraysettings.put("stage", "default");
|
||||
setter.setSettings();
|
||||
match.main(null);
|
||||
@ -153,6 +175,36 @@ public class Launcher extends Application {
|
||||
public void website() {
|
||||
getHostServices().showDocument("https://gitlab.istic.univ-rennes1.fr/fautin/jeu-de-combat");
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void chp1() {
|
||||
VBox v1 = (VBox) namespace.get("p1");
|
||||
ImageView iv1 = (ImageView) v1.getChildren().get(0);
|
||||
ChoiceBox<String> b1 = (ChoiceBox<String>) v1.getChildren().get(1);
|
||||
switch (b1.getValue()) {
|
||||
case "Blue":
|
||||
iv1.setImage(new Image("/launcher/charfaces/blue.png"));
|
||||
break;
|
||||
default:
|
||||
iv1.setImage(new Image("/launcher/default.png"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void chp2() {
|
||||
VBox v1 = (VBox) namespace.get("p2");
|
||||
ImageView iv1 = (ImageView) v1.getChildren().get(0);
|
||||
ChoiceBox<String> b1 = (ChoiceBox<String>) v1.getChildren().get(1);
|
||||
switch (b1.getValue()) {
|
||||
case "Blue":
|
||||
iv1.setImage(new Image("/launcher/charfaces/blue.png"));
|
||||
break;
|
||||
default:
|
||||
iv1.setImage(new Image("/launcher/default.png"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public HashMap<String, Object> getArraysettings() {
|
||||
return arraysettings;
|
||||
|
@ -27,7 +27,7 @@ public class Settings {
|
||||
String stage = (String) set.get("stage");
|
||||
config.write(width, height, rounds, fullscreen, character1, character2, stage);
|
||||
} catch (Exception e) {
|
||||
config.write(800, 600, 3, false, "default", "default", "default");
|
||||
config.write(800, 600, 3, false, "blue", "blue", "default");
|
||||
System.out.println("Incorrect config file");
|
||||
}
|
||||
}
|
||||
@ -39,5 +39,13 @@ public class Settings {
|
||||
public boolean getFullscreen() {
|
||||
return config.fullscreen;
|
||||
}
|
||||
|
||||
public String getChar1() {
|
||||
return config.p1;
|
||||
}
|
||||
|
||||
public String getChar2() {
|
||||
return config.p2;
|
||||
}
|
||||
|
||||
}
|
||||
|
BIN
src/launcher/charfaces/blue.png
Normal file
BIN
src/launcher/charfaces/blue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
src/launcher/default.png
Normal file
BIN
src/launcher/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 KiB |
@ -19,7 +19,7 @@
|
||||
<children>
|
||||
|
||||
<VBox fx:id="sidepanel"
|
||||
prefWidth="200" prefHeight="1280">
|
||||
minWidth="280" prefHeight="1280">
|
||||
<children>
|
||||
|
||||
<ImageView fx:id="logo" fitHeight="120" fitWidth="120">
|
||||
@ -61,18 +61,24 @@
|
||||
|
||||
<HBox fx:id="picker">
|
||||
<children>
|
||||
<VBox fx:id="p1" styleClass="pane_p">
|
||||
<VBox fx:id="p1" styleClass="pane_p" prefWidth="500" prefHeight="720">
|
||||
<children>
|
||||
<ImageView/>
|
||||
<ChoiceBox styleClass="char_box" />
|
||||
<ChoiceBox styleClass="contr_box" />
|
||||
<ImageView styleClass="char_img" fitHeight="400" fitWidth="400">
|
||||
<image>
|
||||
<Image url="/launcher/default.png"/>
|
||||
</image>
|
||||
</ImageView>
|
||||
<ChoiceBox styleClass="char_box" onAction="#chp1"/>
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox fx:id="p2" styleClass="pane_p">
|
||||
<VBox fx:id="p2" styleClass="pane_p" prefWidth="500" prefHeight="720">
|
||||
<children>
|
||||
<ImageView/>
|
||||
<ChoiceBox styleClass="char_box" />
|
||||
<ChoiceBox styleClass="contr_box" />
|
||||
<ImageView styleClass="char_img" fx:id="char_p2" fitHeight="400" fitWidth="400">
|
||||
<image>
|
||||
<Image url="/launcher/default.png"/>
|
||||
</image>
|
||||
</ImageView>
|
||||
<ChoiceBox styleClass="char_box" onAction="#chp2"/>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
|
@ -1,5 +1,6 @@
|
||||
#window {
|
||||
-fx-background-color: #131320;
|
||||
-fx-font-size: 1.25em;
|
||||
}
|
||||
|
||||
Text, Label {
|
||||
@ -19,7 +20,7 @@ Text, Label {
|
||||
/* Logo */
|
||||
.title {
|
||||
-fx-font-weight: bold;
|
||||
-fx-font-size: 1.35em;
|
||||
-fx-font-size: 1.5em;
|
||||
-fx-padding: 1;
|
||||
}
|
||||
|
||||
@ -47,7 +48,7 @@ Text, Label {
|
||||
|
||||
/* Settings */
|
||||
|
||||
.res_box Label {
|
||||
ChoiceBox Label {
|
||||
-fx-fill: #000000;
|
||||
-fx-text-fill: #000000;
|
||||
}
|
||||
@ -65,4 +66,16 @@ Text, Label {
|
||||
/* Link to project */
|
||||
Hyperlink:visited {
|
||||
-fx-text-fill: #0095c8;
|
||||
}
|
||||
|
||||
/**********/
|
||||
/* Picker */
|
||||
/**********/
|
||||
|
||||
#picker {
|
||||
-fx-alignment: top-center;
|
||||
}
|
||||
|
||||
#picker VBox {
|
||||
-fx-alignment: top-center;
|
||||
}
|
Reference in New Issue
Block a user