Merge branch 'master' of https://gitlab.istic.univ-rennes1.fr/fautin/jeu-de-combat.git
This commit is contained in:
commit
c5ac0e9297
@ -745,7 +745,268 @@ public class BlueBaseFrames {
|
||||
f[3] = walkBackFrame4();
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame KnockedDown1() {
|
||||
//movement data
|
||||
double moveX = -6.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,(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame KnockedDown2() {
|
||||
//movement data
|
||||
double moveX = -6.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 KnockedDown3() {
|
||||
//movement data
|
||||
double moveX = -6.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),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame KnockedDown4() {
|
||||
//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*3),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame KnockedDown5() {
|
||||
//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*4),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame KnockedDown6() {
|
||||
//movement data
|
||||
double moveX = -6.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*5),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame KnockedDown7() {
|
||||
//movement data
|
||||
double moveX = -6.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*6),(138*6),138,138);
|
||||
return f;
|
||||
}
|
||||
|
||||
private static Frame KnockedDown8() {
|
||||
//movement data
|
||||
double moveX = -6.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;
|
||||
}
|
||||
|
||||
protected static Frame[] knockedDown() {
|
||||
Frame[] f = new Frame[50];
|
||||
int i=0;
|
||||
while(i < 5) {
|
||||
f[i] = KnockedDown1();
|
||||
i++;
|
||||
}
|
||||
while(i < 10) {
|
||||
f[i] = KnockedDown2();
|
||||
i++;
|
||||
}
|
||||
while(i < 15) {
|
||||
f[i] = KnockedDown3();
|
||||
i++;
|
||||
}
|
||||
while(i < 30) {
|
||||
f[i] = KnockedDown4();
|
||||
i++;
|
||||
}
|
||||
while(i < 35) {
|
||||
f[i] = KnockedDown5();
|
||||
i++;
|
||||
}
|
||||
while(i < 40) {
|
||||
f[i] = KnockedDown6();
|
||||
i++;
|
||||
}
|
||||
while(i < 45) {
|
||||
f[i] = KnockedDown7();
|
||||
i++;
|
||||
}
|
||||
while(i < f.length) {
|
||||
f[i] = KnockedDown8();
|
||||
i++;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Engine engine = new Engine(640, 480, false, new Vector3f(4.0f, 3.0f));
|
||||
|
@ -57,12 +57,14 @@ public class CharacterBlue {
|
||||
Dash bDash =new Dash(bdashCMD,bDashF);
|
||||
|
||||
Frame[] fallingFs = new Frame[0];
|
||||
|
||||
|
||||
Frame[] knDwn = BlueBaseFrames.knockedDown();
|
||||
|
||||
Frame f = new Frame();
|
||||
|
||||
|
||||
|
||||
Character c = new Character(0,0,standF[0],1000,atks,fJ,nJ,bJ,fDash,bDash,th,standF,crouchF,fWalkF,bWalkF,f,f,fallingFs,sbf,cbf,shf,chf);
|
||||
Character c = new Character(0,0,standF[0],1000,atks,fJ,nJ,bJ,fDash,bDash,th,standF,crouchF,fWalkF,bWalkF,f,f,knDwn,sbf,cbf,shf,chf);
|
||||
|
||||
return c;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user