From 331cd4fd64b5409440069fb945dac2293ee67b96 Mon Sep 17 00:00:00 2001 From: keizaal Date: Sat, 19 Jun 2021 20:08:11 +0200 Subject: [PATCH] Implemented functions for crouchshort and added in CharacterBlue atks --- src/gameplay/Characters/Blue/BlueNormals.java | 119 ++++++++++++++++++ .../Characters/Blue/CharacterBlue.java | 2 +- 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index 7b030e6..8211abe 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -202,6 +202,125 @@ public class BlueNormals { return new Attack(isSpecial,rS,cmd,parts); } + private static Frame crouchBFrame1() { + //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 ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //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),0,138,138); + return f; + } + + private static Frame crouchBFrame2() { + //movement data + double moveX = 8.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //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*14),138,138); + return f; + } + + private static Frame crouchBFrame3() { + //movement data + double moveX = 8.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = false; + boolean jumpC = false; + boolean moveC = false; + boolean dashC = false; + + //hitbox lists + ArrayList ahb = new ArrayList(); + ArrayList athb = new ArrayList(); + ArrayList phb = new ArrayList(); + ArrayList pthb = new ArrayList(); + + //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),0,138,138); + return f; + } + + private static attackPart blueCrouchBstartup() { + Frame[] f = new Frame[3]; + f[0] = crouchBFrame1(); + f[1] = crouchBFrame1(); + f[2] = crouchBFrame1(); + return(new attackPart(f)); + } + + private static attackPart blueCrouchBrecovery() { + Frame[] f = new Frame[4]; + f[0] = crouchBFrame3(); + f[1] = crouchBFrame3(); + f[2] = crouchBFrame3(); + f[3] = crouchBFrame3(); + return(new attackPart(f)); + } + + private static attackPart blueCrouchBactive() { + Frame[] f = new Frame[4]; + f[0] = crouchBFrame2(); + f[1] = crouchBFrame2(); + f[2] = crouchBFrame2(); + f[3] = crouchBFrame2(); + return(new attackPart(15,0,9,8,10,5,f,false,false,false)); + } + + public static Attack blueCrouchShort() { + ButtonIG[][] cmd = {{DOWN,B}}; + boolean isSpecial = false; + Status rS = Status.NORMAL; + attackPart[] parts = {blueCrouchBstartup(),blueCrouchBactive(),blueCrouchBrecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } + + private static Frame standAFrame1(){ /* diff --git a/src/gameplay/Characters/Blue/CharacterBlue.java b/src/gameplay/Characters/Blue/CharacterBlue.java index 894a96d..03e6c2e 100644 --- a/src/gameplay/Characters/Blue/CharacterBlue.java +++ b/src/gameplay/Characters/Blue/CharacterBlue.java @@ -31,7 +31,7 @@ public class CharacterBlue { Jump nJ = new Jump(njcmd,nJumpF); Jump bJ = new Jump(bjcmd,bJumpF); - Attack[] atks = {blueLDP(),blueFordwardRoundHouse(),blueCrouchFierce(),blueCrouchJab(),blueStandHeavyKick(),blueStandJab(),blueFordwardRoundHouse()}; + Attack[] atks = {blueLDP(),blueCrouchFierce(),blueCrouchJab(),blueCrouchShort(),blueStandHeavyKick(),blueStandJab(),blueFordwardRoundHouse()}; /* * Temporary values to change later