Corrected sprites and added hitboxes for blue stand C

This commit is contained in:
Azra Victor 2021-06-23 21:48:35 +02:00 committed by no
parent 74bad4b80b
commit 9c07f8c60a
2 changed files with 88 additions and 22 deletions

View File

@ -1022,7 +1022,7 @@ public class BlueBaseFrames {
String path = "textures/Sprite_sans_grille_9comp.png"; String path = "textures/Sprite_sans_grille_9comp.png";
String pathToBG = "textures/arena1.png"; String pathToBG = "textures/arena1.png";
Frame f = BlueNormals.crouchCFrame2(); Frame f = BlueNormals.StandCFrame4();
ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null); ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null);

View File

@ -342,7 +342,7 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame crouchBFrame1() { protected static Frame crouchBFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -370,7 +370,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame crouchBFrame2() { protected static Frame crouchBFrame2() {
//movement data //movement data
double moveX = 8.0; double moveX = 8.0;
double moveY = 0.0; double moveY = 0.0;
@ -398,7 +398,7 @@ public class BlueNormals {
return f; return f;
} }
private static Frame crouchBFrame3() { protected static Frame crouchBFrame3() {
//movement data //movement data
double moveX = 8.0; double moveX = 8.0;
double moveY = 0.0; double moveY = 0.0;
@ -743,7 +743,7 @@ public class BlueNormals {
return new Attack(isSpecial,rS,cmd,parts); return new Attack(isSpecial,rS,cmd,parts);
} }
private static Frame StandCFrame1() { protected static Frame StandCFrame1() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -761,17 +761,33 @@ public class BlueNormals {
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>(); ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_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); Individual hitboxes creation
*/
Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
Push_HitBox pushb = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); /*
adding hitboxes to lists
*/
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
pthb.add(pthb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pushb,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet //set sprite data on sheet
f.setSpriteWrap(0,0,138,138); f.setSpriteWrap(0,0,138,138);
return f; return f;
} }
private static Frame StandCFrame2() { protected static Frame StandCFrame2() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -788,18 +804,33 @@ public class BlueNormals {
ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>(); ArrayList<Active_throw_Hitbox> athb = new ArrayList<Active_throw_Hitbox>();
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>(); ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>(); ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_HitBox>();
/*
Individual hitboxes creation
*/
Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-150*1.25f,200*1.25f,180*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(200*1.25f,-350*1.25f,200*1.25f,200*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(250*1.25f,-120*1.25f,70*1.25f,80*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
Push_HitBox pushb = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
//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); adding hitboxes to lists
*/
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
pthb.add(pthb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pushb,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet //set sprite data on sheet
f.setSpriteWrap((138*3),(138*2),138,138); f.setSpriteWrap((138*2),(138*3),138,138);
return f; return f;
} }
private static Frame StandCFrame3() { protected static Frame StandCFrame3() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -817,17 +848,35 @@ public class BlueNormals {
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>(); ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_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); Individual hitboxes creation
*/
Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-150*1.25f,200*1.25f,200*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(200*1.25f,-350*1.25f,170*1.25f,200*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(250*1.25f,-200*1.25f,80*1.25f,50*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,250*1.25f,70*1.25f);
Push_HitBox pushb = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
Active_HitBox ahb1 = new Active_HitBox(350,-220,250,130);
/*
adding hitboxes to lists
*/
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
pthb.add(pthb1);
ahb.add(ahb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pushb,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet //set sprite data on sheet
f.setSpriteWrap(138,(138*6),138,138); f.setSpriteWrap(138*6,138,138,138);
return f; return f;
} }
private static Frame StandCFrame4() { protected static Frame StandCFrame4() {
//movement data //movement data
double moveX = 0.0; double moveX = 0.0;
double moveY = 0.0; double moveY = 0.0;
@ -845,10 +894,27 @@ public class BlueNormals {
ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>(); ArrayList<Passive_HitBox> phb = new ArrayList<Passive_HitBox>();
ArrayList<Passive_throw_HitBox> pthb = new ArrayList<Passive_throw_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); Individual hitboxes creation
*/
Passive_HitBox phb1 = new Passive_HitBox(200*1.25f,-200*1.25f,150*1.25f,150*1.25f);
Passive_HitBox phb2 = new Passive_HitBox(220*1.25f,-300*1.25f,100*1.25f,150*1.25f);
Passive_HitBox phb3 = new Passive_HitBox(200*1.25f,-400*1.25f,150*1.25f,150*1.25f);
Passive_HitBox phb4 = new Passive_HitBox(280*1.25f,-150*1.25f,50*1.25f,50*1.25f);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(150*1.25f,-500*1.25f,220*1.25f,70*1.25f);
Push_HitBox pushb = new Push_HitBox(200*1.25f,-150*1.25f,160*1.25f,400*1.25f);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); /*
adding hitboxes to lists
*/
phb.add(phb1);
phb.add(phb2);
phb.add(phb3);
phb.add(phb4);
pthb.add(pthb1);
Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pushb,normalC,specialC,jumpC,moveC,dashC);
//set sprite data on sheet //set sprite data on sheet
f.setSpriteWrap(138,(138*7),138,138); f.setSpriteWrap(138,(138*7),138,138);