This commit is contained in:
François Autin 2021-06-24 02:13:05 +02:00
commit 6adfc52891
4 changed files with 190 additions and 93 deletions

View File

@ -765,7 +765,7 @@ public class BlueBaseFrames {
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);
Push_HitBox pB1 = new Push_HitBox(300,-450,200,300);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
@ -793,7 +793,7 @@ public class BlueBaseFrames {
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);
Push_HitBox pB1 = new Push_HitBox(300,-450,200,300);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
@ -821,7 +821,7 @@ public class BlueBaseFrames {
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);
Push_HitBox pB1 = new Push_HitBox(300,-450,200,300);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
@ -849,7 +849,7 @@ public class BlueBaseFrames {
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);
Push_HitBox pB1 = new Push_HitBox(300,-450,200,300);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
@ -877,7 +877,7 @@ public class BlueBaseFrames {
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);
Push_HitBox pB1 = new Push_HitBox(300,-450,200,300);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
@ -905,7 +905,7 @@ public class BlueBaseFrames {
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);
Push_HitBox pB1 = new Push_HitBox(300,-450,200,300);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
@ -933,7 +933,7 @@ public class BlueBaseFrames {
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);
Push_HitBox pB1 = new Push_HitBox(300,-450,200,300);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
@ -961,7 +961,7 @@ public class BlueBaseFrames {
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);
Push_HitBox pB1 = new Push_HitBox(300,-450,200,300);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
@ -1022,7 +1022,7 @@ public class BlueBaseFrames {
String path = "textures/Sprite_sans_grille_9comp.png";
String pathToBG = "textures/arena1.png";
Frame f = BlueNormals.crouchDFrame2();
Frame f = BlueNormals.JumpDFrame2();
ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null);
blue.setTextureWrap(f.getSprite()[0], f.getSprite()[1], f.getSprite()[2], f.getSprite()[3]);

View File

@ -1648,7 +1648,7 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts);
}
private static Frame JumpAFrame1() {
protected static Frame JumpAFrame1() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1667,16 +1667,26 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
phb.add(phb5);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*12),(138*3),138,138);
return f;
}
private static Frame JumpAFrame2() {
protected static Frame JumpAFrame2() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1694,17 +1704,28 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-150,160*1.25f,350);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-280,200,80);
Active_HitBox ahb1 = new Active_HitBox(420,-250,120,120);
Active_HitBox ahb2 = new Active_HitBox(520,-330,120,120);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb5);
ahb.add(ahb1);
ahb.add(ahb2);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*13),(138*3),138,138);
return f;
}
private static Frame JumpAFrame3() {
protected static Frame JumpAFrame3() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1722,10 +1743,19 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-150*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-400*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-250*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-100*1.25f,70*1.25f,50*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-70*1.25f,70*1.25f,100*1.25f);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
phb.add(phb5);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*14),(138*3),138,138);
@ -1764,7 +1794,7 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts);
}
private static Frame JumpCFrame1() {
protected static Frame JumpCFrame1() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1783,16 +1813,26 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
phb.add(phb5);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*12),(138*3),138,138);
return f;
}
private static Frame JumpCFrame2() {
protected static Frame JumpCFrame2() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1811,16 +1851,28 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-150,160*1.25f,350);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-280,200,80);
Active_HitBox ahb1 = new Active_HitBox(420,-250,120,120);
Active_HitBox ahb2 = new Active_HitBox(520,-330,120,120);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb5);
ahb.add(ahb1);
ahb.add(ahb2);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*13),(138*3),138,138);
return f;
}
private static Frame JumpCFrame3() {
protected static Frame JumpCFrame3() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1839,9 +1891,19 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-150*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-400*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-250*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-100*1.25f,70*1.25f,50*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-70*1.25f,70*1.25f,100*1.25f);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
phb.add(phb5);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*14),(138*3),138,138);
@ -1880,7 +1942,7 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts);
}
private static Frame JumpBFrame1() {
protected static Frame JumpBFrame1() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1899,16 +1961,26 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
phb.add(phb5);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*14),138,138,138);
return f;
}
private static Frame JumpBFrame2() {
protected static Frame JumpBFrame2() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1927,16 +1999,30 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-250,230,100);
Active_HitBox ahb1 = new Active_HitBox(360,-240,200,120);
Active_HitBox ahb2 = new Active_HitBox(530,-200,120,120);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
phb.add(phb5);
ahb.add(ahb1);
ahb.add(ahb2);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*13),138,138,138);
return f;
}
private static Frame JumpBFrame3() {
protected static Frame JumpBFrame3() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -1955,9 +2041,19 @@ public class BlueNormals {
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);
Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f);
Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f);
Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f);
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
phb.add(phb5);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet
f.setSpriteWrap((138*14),138,138,138);
@ -1996,7 +2092,7 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts);
}
private static Frame JumpDFrame1() {
protected static Frame JumpDFrame1() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -2015,7 +2111,10 @@ public class BlueNormals {
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);
Push_HitBox bStandPB1 = new Push_HitBox(250,-50,150,400);
Passive_HitBox phb1 = new Passive_HitBox(240,-50,170,430);
phb.add(phb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
@ -2024,7 +2123,7 @@ public class BlueNormals {
return f;
}
private static Frame JumpDFrame2() {
protected static Frame JumpDFrame2() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -2043,7 +2142,14 @@ public class BlueNormals {
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);
Push_HitBox bStandPB1 = new Push_HitBox(250,-50,150,400);
Passive_HitBox phb1 = new Passive_HitBox(240,-50,170,430);
Passive_HitBox phb2 = new Passive_HitBox(330,-240,220,100);
Active_HitBox ahb1 = new Active_HitBox(330,-230,280,150);
phb.add(phb1);
phb.add(phb2);
ahb.add(ahb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);
@ -2052,7 +2158,7 @@ public class BlueNormals {
return f;
}
private static Frame JumpDFrame3() {
protected static Frame JumpDFrame3() {
//movement data
double moveX = 0.0;
double moveY = 0.0;
@ -2071,7 +2177,10 @@ public class BlueNormals {
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);
Push_HitBox bStandPB1 = new Push_HitBox(250,-50,150,400);
Passive_HitBox phb1 = new Passive_HitBox(240,-50,170,430);
phb.add(phb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC);

View File

@ -24,20 +24,23 @@ public class nextFrameBuffer {
}
public void clone(nextFrameBuffer f) {
this.current = f.current;
this.next = f.next;
try{
Frame cf = new Frame();
cf.clone(f.current);
this.current = cf; }
catch (NullPointerException n) {
this.current = null;
this.next = null;
}
nextFrameBuffer nfb = new nextFrameBuffer();
try {
nfb.clone(f.next);
} catch (NullPointerException n) {}
this.next = nfb;
// try{
// Frame cf = new Frame();
// cf.clone(f.current);
// this.current = cf; }
// catch (NullPointerException n) {
// this.current = null;
// this.next = null;
// }
// nextFrameBuffer nfb = new nextFrameBuffer();
// try {
// nfb.clone(f.next);
// } catch (NullPointerException n) {}
// this.next = nfb;
}

View File

@ -28,6 +28,7 @@ import gameplay.input.ButtonIG;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.sql.SQLOutput;
import java.util.ArrayList;
import java.util.List;
@ -129,20 +130,21 @@ public class match {
/**
* Ends the round.
* Used for playing animations and such.
* TODO : Implement this once we know what to do.
* @throws InterruptedException
*/
private static void endRound() throws InterruptedException {
private static void endRound() {
String victoryTxt = roundP1 ? "Player1 won the round" : "Player2 won the round";
if(roundP1) {
//texte de victoire
System.out.println("P1 won the round");
roundWon = new UIElementText("Player1 won the round", 5f, 0.25f, 0.5f, 100f, engine);
roundWon.setBackground(new Vector3f(0f,0f,0f));
System.out.println(victoryTxt);
roundWon = new UIElementText(victoryTxt, 5f, 0.25f, 0.5f, 200f, engine);
roundWon.setShader("shaders/StylishShaders/WavyTextVert.glsl", "shaders/StylishShaders/TextFrag.glsl", true, true);
engine.add_uiElement(roundWon);
timeStamp1 = System.currentTimeMillis();
while(System.currentTimeMillis() - timeStamp1 < 2500){
engine.update();
engine.render();
Thread.sleep(1000);
}
engine.remove_uiElement(roundWon);
//replacement des sprites
@ -150,24 +152,7 @@ public class match {
objP2.translate(new Vector3f(-p2.getPosX(), -p2.getPosY()));
objP1.getShadow().translate(new Vector3f(0f,-p1.getPosY(),0));
objP2.getShadow().translate(new Vector3f(0f,-p2.getPosY(),0));
}
else {
//texte de victoire
System.out.println("P2 won the round");
roundWon = new UIElementText("Player2 won the round", 5f, 0.25f, 0.5f, 100f, engine);
roundWon.setBackground(new Vector3f(0f,0f,0f));
engine.add_uiElement(roundWon);
engine.update();
engine.render();
Thread.sleep(1000);
engine.remove_uiElement(roundWon);
//replacement des sprites
objP1.translate(new Vector3f(-p1.getPosX(), -p1.getPosY()));
objP2.translate(new Vector3f(-p2.getPosX(), -p2.getPosY()));
objP1.getShadow().translate(new Vector3f(0f,-p1.getPosY(),0));
objP2.getShadow().translate(new Vector3f(0f,-p2.getPosY(),0));
}
}
/**
@ -651,7 +636,7 @@ public class match {
*/
private static void getHit(Character c, attackPart aP, Inputs inputs) {
boolean getsHit = (c.getStatus() == Status.JUMPING) || (c.getStatus() == Status.HITINAIR) || (c.getStatus() == Status.FALLING)
|| inputs.containsInput(ButtonIG.BACK)
|| !inputs.containsInput(ButtonIG.BACK)
|| (aP.isLow() && !inputs.containsInput(ButtonIG.DOWN))
|| (aP.isOverHead() && inputs.containsInput(ButtonIG.DOWN));
Frame[] nextFrames;