diff --git a/src/gameplay/Characters/Blue/BlueBaseFrames.java b/src/gameplay/Characters/Blue/BlueBaseFrames.java index 270ecc6..a5e121c 100644 --- a/src/gameplay/Characters/Blue/BlueBaseFrames.java +++ b/src/gameplay/Characters/Blue/BlueBaseFrames.java @@ -21,7 +21,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,true,true,true,true,true); - blueStandframe1.setSpriteWrap(0,0,112,120); + blueStandframe1.setSpriteWrap(0,0,102,120); return blueStandframe1; } @@ -35,7 +35,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,true,true,true,true,true); - blueStandframe1.setSpriteWrap(0,0,112,120); + blueStandframe1.setSpriteWrap(0,0,102,120); return blueStandframe1; } @@ -54,7 +54,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,true,true,true,true,true); - blueStandframe1.setSpriteWrap(112,120,112,120); + blueStandframe1.setSpriteWrap(102,120,102,120); return blueStandframe1; } @@ -73,7 +73,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(-10.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,false,false,false,false,false); - blueStandframe1.setSpriteWrap(830,0,112,120); + blueStandframe1.setSpriteWrap(816,0,102,120); return blueStandframe1; } @@ -87,7 +87,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(10.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,false,false,false,false,false); - blueStandframe1.setSpriteWrap(830,0,112,120); + blueStandframe1.setSpriteWrap(816,0,102,120); return blueStandframe1; } @@ -112,7 +112,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(-10.0,10.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,false,false,false,false,false); - blueStandframe1.setSpriteWrap(750,0,112,120); + blueStandframe1.setSpriteWrap(816,0,102,120); return blueStandframe1; } @@ -126,7 +126,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(10.0,10.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,false,false,false,false,false); - blueStandframe1.setSpriteWrap(750,0,112,120); + blueStandframe1.setSpriteWrap(816,0,102,120); return blueStandframe1; } @@ -151,7 +151,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(-10.0,-10.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,false,false,false,false,false); - blueStandframe1.setSpriteWrap(750,0,112,120); + blueStandframe1.setSpriteWrap(816,0,102,120); return blueStandframe1; } @@ -176,7 +176,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(10.0,-10.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,false,false,false,false,false); - blueStandframe1.setSpriteWrap(750,0,112,120); + blueStandframe1.setSpriteWrap(816,0,102,120); return blueStandframe1; } @@ -190,7 +190,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,true,true,true,true,true); - blueStandframe1.setSpriteWrap(220,0,112,120); + blueStandframe1.setSpriteWrap(204,0,102,120); return blueStandframe1; } @@ -204,7 +204,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,true,true,true,true,true); - blueStandframe1.setSpriteWrap(330,0,112,120); + blueStandframe1.setSpriteWrap(306,0,102,120); return blueStandframe1; } @@ -218,7 +218,7 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,true,true,true,true,true); - blueStandframe1.setSpriteWrap(420,0,112,120); + blueStandframe1.setSpriteWrap(408,0,102,120); return blueStandframe1; } @@ -232,16 +232,25 @@ public class BlueBaseFrames { pthb.add(bStandPTHB1); Frame blueStandframe1 = new Frame(0.0,8.0,phb,new ArrayList(),pthb,new ArrayList(), bStandPB1,true,true,true,true,true); - blueStandframe1.setSpriteWrap(500,0,112,120); + blueStandframe1.setSpriteWrap(510,0,102,120); return blueStandframe1; } protected static Frame[] blueFWalk() { - Frame[] f = new Frame[4]; + Frame[] f = new Frame[12]; f[0] = walkForwardFrame1(); - f[1] = walkForwardFrame2(); - f[2] = walkForwardFrame3(); - f[3] = walkForwardFrame4(); + f[1] = walkForwardFrame1(); + f[2] = walkForwardFrame1(); + f[3] = walkForwardFrame2(); + f[4] = walkForwardFrame2(); + f[5] = walkForwardFrame2(); + f[6] = walkForwardFrame3(); + f[7] = walkForwardFrame3(); + f[8] = walkForwardFrame3(); + f[9] = walkForwardFrame4(); + f[10] = walkForwardFrame4(); + f[11] = walkForwardFrame4(); + return f; } diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index 4311d4b..e66c6d6 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -4,10 +4,94 @@ import engine.Engine; import engine.math.Vector3f; import engine.object.Hitbox; import engine.object.ObjectGl; +import gameplay.actions.Attack; +import gameplay.actions.attackPart; +import gameplay.entities.Status; import gameplay.frames.Frame; import gameplay.hitboxes.*; +import gameplay.input.ButtonIG; + +import java.util.ArrayList; + +import static gameplay.input.ButtonIG.A; +import static gameplay.input.ButtonIG.DOWN; public class BlueNormals { + private static Frame crouchAFrame1(){ + Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + phb.add(bStandPHB1); + pthb.add(bStandPTHB1); + Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), + bStandPB1,true,true,true,true,true); + blueStandframe1.setSpriteWrap(102,120,102,120); + return blueStandframe1; + } + private static Frame crouchAFrame2(){ + Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + phb.add(bStandPHB1); + pthb.add(bStandPTHB1); + Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), + bStandPB1,true,true,true,true,true); + blueStandframe1.setSpriteWrap(816,120,102,120); + return blueStandframe1; + } + + private static Frame crouchAFrame3(){ + Passive_HitBox bStandPHB1 = new Passive_HitBox(70,70,150,500); + Passive_throw_HitBox bStandPTHB1 = new Passive_throw_HitBox(70,400,150,100); + Push_HitBox bStandPB1 = new Push_HitBox(70,70,150,500); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + phb.add(bStandPHB1); + pthb.add(bStandPTHB1); + Frame blueStandframe1 = new Frame(0.0,0.0,phb,new ArrayList(),pthb,new ArrayList(), + bStandPB1,true,true,true,true,true); + blueStandframe1.setSpriteWrap(102,120,102,120); + return blueStandframe1; + } + + private static attackPart blueCrouchAstartup() { + Frame[] f = new Frame[4]; + f[0] = crouchAFrame1(); + f[1] = crouchAFrame1(); + f[2] = crouchAFrame1(); + f[3] = crouchAFrame1(); + return(new attackPart(f)); + } + + private static attackPart blueCrouchArecovery() { + Frame[] f = new Frame[5]; + f[0] = crouchAFrame3(); + f[1] = crouchAFrame3(); + f[2] = crouchAFrame3(); + f[3] = crouchAFrame3(); + f[4] = crouchAFrame3(); + return(new attackPart(f)); + } + + private static attackPart blueCrouchAactive() { + Frame[] f = new Frame[3]; + f[0] = crouchAFrame3(); + f[1] = crouchAFrame2(); + f[2] = crouchAFrame2(); + return(new attackPart(15,0,4,4,8,3,f,false,false,false)); + } + + public static Attack blueCrouchJab() { + ButtonIG[][] cmd = {{DOWN,A}}; + boolean isSpecial = false; + Status rS = Status.NORMAL; + attackPart[] parts = {blueCrouchAstartup(),blueCrouchAactive(),blueCrouchAstartup()}; + return new Attack(isSpecial,rS,cmd,parts); + } } diff --git a/src/gameplay/Characters/Blue/CharacterBlue.java b/src/gameplay/Characters/Blue/CharacterBlue.java index 390c4ee..e5ffda7 100644 --- a/src/gameplay/Characters/Blue/CharacterBlue.java +++ b/src/gameplay/Characters/Blue/CharacterBlue.java @@ -29,6 +29,8 @@ public class CharacterBlue { Jump nJ = new Jump(njcmd,nJumpF); Jump bJ = new Jump(bjcmd,bJumpF); + Attack[] atks = {BlueNormals.blueCrouchJab()}; + /* * Temporary values to change later */ @@ -49,7 +51,7 @@ public class CharacterBlue { Frame f = new Frame(); - Attack[] atks = new Attack[0]; + Character c = new Character(0,0,standF[0],1000,atks,fJ,nJ,bJ,fDash,bDash,th,standF,crouchF,fWalkF,bWalkF,f,f,fallingFs,f,f,f,f);