From 8076bc5fd7ed6801c54d2c4cd78f31138ce87b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rativel?= Date: Wed, 23 Jun 2021 15:39:06 +0200 Subject: [PATCH] Implemented all Jump Normal in BlueNormals and their calling in CharacterBlue --- src/gameplay/Characters/Blue/BlueNormals.java | 463 ++++++++++++++++++ .../Characters/Blue/CharacterBlue.java | 7 +- 2 files changed, 467 insertions(+), 3 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index ae8eb9a..71c5d95 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -1426,5 +1426,468 @@ public class BlueNormals { attackPart[] parts = {blueForwardDstartup(),blueForwardDactive(),blueForwardDactive2(),blueForwardDrecovery()}; return new Attack(isSpecial,rS,cmd,parts); } + + private static Frame JumpAFrame1() { + //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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*12),(138*3),138,138); + return f; + } + + private static Frame JumpAFrame2() { + //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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*13),(138*3),138,138); + return f; + } + + private static Frame JumpAFrame3() { + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = true; + 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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*14),(138*3),138,138); + return f; + } + + private static attackPart blueJumpAstartup() { + Frame[] f = new Frame[3]; + for(int i = 0; i < 3; i++) { + f[i] = JumpAFrame1(); + } + return(new attackPart(f)); + } + + private static attackPart blueJumpAactive() { + Frame[] f = new Frame[4]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpAFrame2(); + } + return(new attackPart(80,0,10,5,8,3,f,false,true,false)); + } + + private static attackPart blueJumpArecovery() { + Frame[] f = new Frame[5]; + for(int i = 0; i < 5; i++) { + f[i] = JumpAFrame3(); + } + return(new attackPart(f)); + } + + public static Attack blueJumpJab() { + ButtonIG[][] cmd = {{A}}; + boolean isSpecial = false; + Status rS = Status.JUMPING; + attackPart[] parts = {blueJumpAstartup(),blueJumpAactive(),blueJumpArecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } + + private static Frame JumpCFrame1() { + //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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*12),(138*3),138,138); + return f; + } + + private static Frame JumpCFrame2() { + //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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*13),(138*3),138,138); + return f; + } + + private static Frame JumpCFrame3() { + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = true; + 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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*14),(138*3),138,138); + return f; + } + + private static attackPart blueJumpCstartup() { + Frame[] f = new Frame[4]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpCFrame1(); + } + return(new attackPart(f)); + } + + private static attackPart blueJumpCactive() { + Frame[] f = new Frame[8]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpCFrame2(); + } + return(new attackPart(115,0,30,5,13,5,f,false,true,false)); + } + + private static attackPart blueJumpCrecovery() { + Frame[] f = new Frame[15]; + for(int i = 0; i < 5; i++) { + f[i] = JumpCFrame3(); + } + return(new attackPart(f)); + } + + public static Attack blueJumpFierce() { + ButtonIG[][] cmd = {{C}}; + boolean isSpecial = false; + Status rS = Status.JUMPING; + attackPart[] parts = {blueJumpCstartup(),blueJumpCactive(),blueJumpCrecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } + + private static Frame JumpBFrame1() { + //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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*14),138,138,138); + return f; + } + + private static Frame JumpBFrame2() { + //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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*13),138,138,138); + return f; + } + + private static Frame JumpBFrame3() { + //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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*14),138,138,138); + return f; + } + + private static attackPart blueJumpBstartup() { + Frame[] f = new Frame[3]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpBFrame1(); + } + return(new attackPart(f)); + } + + private static attackPart blueJumpBactive() { + Frame[] f = new Frame[40]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpBFrame2(); + } + return(new attackPart(80,0,30,15,25,10,f,false,true,false)); + } + + private static attackPart blueJumpBrecovery() { + Frame[] f = new Frame[6]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpBFrame3(); + } + return(new attackPart(f)); + } + + public static Attack blueJumpShort() { + ButtonIG[][] cmd = {{B}}; + boolean isSpecial = false; + Status rS = Status.JUMPING; + attackPart[] parts = {blueJumpBstartup(),blueJumpBactive(),blueJumpBrecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } + + private static Frame JumpDFrame1() { + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = true; + 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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*11),(138*6),138,138); + return f; + } + + private static Frame JumpDFrame2() { + //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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*10),(138*6),138,138); + return f; + } + + private static Frame JumpDFrame3() { + //movement data + double moveX = 0.0; + double moveY = 0.0; + + //cancelData + boolean normalC = false; + boolean specialC = true; + 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 bStandPB1 = new Push_HitBox(70,70,150,500); + + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + + //set sprite data on sheet + f.setSpriteWrap((138*11),(138*6),138,138); + return f; + } + + private static attackPart blueJumpDstartup() { + Frame[] f = new Frame[4]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpDFrame1(); + } + return(new attackPart(f)); + } + + private static attackPart blueJumpDactive() { + Frame[] f = new Frame[8]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpDFrame2(); + } + return(new attackPart(115,0,50,20,45,15,f,false,true,false)); + } + + private static attackPart blueJumpDrecovery() { + Frame[] f = new Frame[36]; + for(int i = 0; i < f.length; i++) { + f[i] = JumpDFrame3(); + } + return(new attackPart(f)); + } + + public static Attack blueJumpRoundHouse() { + ButtonIG[][] cmd = {{D}}; + boolean isSpecial = false; + Status rS = Status.JUMPING; + attackPart[] parts = {blueJumpDstartup(),blueJumpDactive(),blueJumpDrecovery()}; + return new Attack(isSpecial,rS,cmd,parts); + } } diff --git a/src/gameplay/Characters/Blue/CharacterBlue.java b/src/gameplay/Characters/Blue/CharacterBlue.java index 5b5bfc2..2e29df3 100644 --- a/src/gameplay/Characters/Blue/CharacterBlue.java +++ b/src/gameplay/Characters/Blue/CharacterBlue.java @@ -31,9 +31,10 @@ public class CharacterBlue { Jump nJ = new Jump(njcmd,nJumpF); Jump bJ = new Jump(bjcmd,bJumpF); - Attack[] atks = {blueLDP(),blueCrouchFierce(),blueCrouchJab(),blueCrouchShort(),blueCrouchRoundHouse(), - blueStandHeavyKick(),blueStandJab(),blueStandFierce(),blueStandShort(), - blueFordwardRoundHouse()}; + Attack[] atks = {blueLDP(),blueJumpJab(),blueJumpFierce(),blueJumpShort(),blueJumpRoundHouse(), + blueFordwardRoundHouse(), + blueCrouchFierce(),blueCrouchJab(),blueCrouchShort(),blueCrouchRoundHouse(), + blueStandHeavyKick(),blueStandJab(),blueStandFierce(),blueStandShort()}; Frame shf = BlueMisc.blueStandHit(); Frame chf = BlueMisc.blueCrouchHit();