Corrected sprites and added hitboxes for blue light DP

This commit is contained in:
Azra Victor 2021-06-24 13:51:39 +02:00 committed by no
parent 383cd4f213
commit 46cff73d47

View File

@ -16,7 +16,51 @@ import java.util.ArrayList;
import static gameplay.input.ButtonIG.*; import static gameplay.input.ButtonIG.*;
public class BlueSpecials { public class BlueSpecials {
private static Frame lDPFrame1(){ protected static Frame lDPFrame1(){
/*
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>();
//generate hitboxes here and then use ArrayList add method to add them to the correct list
Push_HitBox pB = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f);
/*
frame creation
*/
Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(0,138*5,138,138);
return f;
}
protected static Frame lDPFrame2(){
/*
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>();
//generate hitboxes here and then use ArrayList add method to add them to the correct list
Push_HitBox pB = new Push_HitBox(140*1.25f,-250*1.25f,280*1.25f,300*1.25f);
/*
frame creation
*/
Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(138*7,138*2,138,138);
return f;
}
protected static Frame lDPFrame3(){
/* /*
Hitboxes lists creation Hitboxes lists creation
@ -29,9 +73,101 @@ public class BlueSpecials {
/* /*
Individual hitboxes creation Individual hitboxes creation
*/ */
Passive_HitBox phb1 = new Passive_HitBox(70,70,150,500); Push_HitBox pushB = new Push_HitBox(250,-70,150,500);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(70,400,150,100); Active_HitBox ahb1 = new Active_HitBox(350,-0,150,500);
Push_HitBox pushB = new Push_HitBox(70,70,150,500);
ahb.add(ahb1);
/*
frame creation
*/
Frame f = new Frame(25.0,12.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(138*2,138*5,138,138);
return f;
}
protected static Frame lDPFrame4(){
/*
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
*/
Push_HitBox pushB = new Push_HitBox(250,-70,150,500);
Active_HitBox ahb1 = new Active_HitBox(350,-0,150,500);
Passive_HitBox phb1 = new Passive_HitBox(250,-70,150,500);
ahb.add(ahb1);
/*
adding hitboxes to lists
*/
phb.add(phb1);
/*
frame creation
*/
Frame f = new Frame(25.0,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(138*2,138*5,138,138);
return f;
}
protected static Frame lDPFrame5(){
/*
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
*/
Push_HitBox pushB = new Push_HitBox(250,-70,150,500);
Passive_HitBox phb1 = new Passive_HitBox(250,-70,250,550);
/*
adding hitboxes to lists
*/
phb.add(phb1);
/*
frame creation
*/
Frame f = new Frame(-25.0,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(138*3,138*5,138,138);
return f;
}
protected static Frame lDPFrame6(){
/*
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(270,-70,200,500);
Passive_throw_HitBox pthb1 = new Passive_throw_HitBox(270,-600,250,100);
Push_HitBox pushB = new Push_HitBox(270,-70,150,550);
/* /*
adding hitboxes to lists adding hitboxes to lists
@ -45,182 +181,19 @@ public class BlueSpecials {
Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB, Frame f = new Frame(0.0,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash) //cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false); false,false,false,false,false);
f.setSpriteWrap(102,0,102,120); f.setSpriteWrap(138*4,138*5,138,138);
return f;
}
private static Frame lDPFrame2(){
/*
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,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(306,0,102,120);
return f;
}
private static Frame lDPFrame3(){
/*
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(8.0,5.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(714,0,102,120);
return f; return f;
} }
private static Frame lDPFrame4(){ protected static attackPart lDPStartup() {
/*
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(8.0,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(714,0,102,120);
return f;
}
private static Frame lDPFrame5(){
/*
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(-8.0,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(714,0,102,120);
return f;
}
private static Frame lDPFrame6(){
/*
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,0.0,phb,ahb,pthb,athb,pushB,
//cancels (in order : normal, special, jump, move, dash)
false,false,false,false,false);
f.setSpriteWrap(112,0,102,120);
return f;
}
private static attackPart lDPStartup() {
Frame[] f = new Frame[3]; Frame[] f = new Frame[3];
f[0] = lDPFrame1(); f[0] = lDPFrame1();
f[1] = lDPFrame2(); f[1] = lDPFrame2();
f[2] = lDPFrame3(); f[2] = lDPFrame2();
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart lDPRecovery() { protected static attackPart lDPRecovery() {
Frame[] f = new Frame[29]; Frame[] f = new Frame[29];
for(int i = 0; i < 11; i++) { for(int i = 0; i < 11; i++) {
f[i] = lDPFrame5(); f[i] = lDPFrame5();
@ -231,7 +204,7 @@ public class BlueSpecials {
return(new attackPart(f)); return(new attackPart(f));
} }
private static attackPart lDPActive() { protected static attackPart lDPActive() {
Frame[] f = new Frame[11]; Frame[] f = new Frame[11];
for(int i = 0; i < 5; i++) { for(int i = 0; i < 5; i++) {
f[i] = lDPFrame3(); f[i] = lDPFrame3();