From 02bb004cb125644dcd66caf4fc28c36a301f3169 Mon Sep 17 00:00:00 2001 From: no Date: Wed, 23 Jun 2021 23:39:56 +0200 Subject: [PATCH] added hitboxes for blue jump A --- .../Characters/Blue/BlueBaseFrames.java | 2 +- src/gameplay/Characters/Blue/BlueNormals.java | 58 ++++++++++++++----- 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/src/gameplay/Characters/Blue/BlueBaseFrames.java b/src/gameplay/Characters/Blue/BlueBaseFrames.java index cb15aa8..fabf565 100644 --- a/src/gameplay/Characters/Blue/BlueBaseFrames.java +++ b/src/gameplay/Characters/Blue/BlueBaseFrames.java @@ -1022,7 +1022,7 @@ public class BlueBaseFrames { String path = "textures/Sprite_sans_grille_9comp.png"; String pathToBG = "textures/arena1.png"; - Frame f = KnockedDown8(); + Frame f = BlueNormals.JumpAFrame2(); ObjectGl blue = new ObjectGl(0f, 138f, 138f, 5f, path, null); diff --git a/src/gameplay/Characters/Blue/BlueNormals.java b/src/gameplay/Characters/Blue/BlueNormals.java index a93a719..76cbd39 100644 --- a/src/gameplay/Characters/Blue/BlueNormals.java +++ b/src/gameplay/Characters/Blue/BlueNormals.java @@ -1648,7 +1648,7 @@ public class BlueNormals { return new Attack(isSpecial,rS,cmd,parts); } - private static Frame JumpAFrame1() { + protected static Frame JumpAFrame1() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -1667,16 +1667,26 @@ public class BlueNormals { 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); + Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f); + Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f); + Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-50*1.25f,70*1.25f,50*1.25f); + Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-20*1.25f,70*1.25f,100*1.25f); + phb.add(phb1); + phb.add(phb2); + phb.add(phb3); + phb.add(phb4); + phb.add(phb5); - Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet f.setSpriteWrap((138*12),(138*3),138,138); return f; } - private static Frame JumpAFrame2() { + protected static Frame JumpAFrame2() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -1694,17 +1704,28 @@ public class BlueNormals { 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); + Push_HitBox pB1 = new Push_HitBox(200*1.25f,-150,160*1.25f,350); + Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-100*1.25f,170*1.25f,200*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-350*1.25f,90*1.25f,80*1.25f); + Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-200*1.25f,140*1.25f,160*1.25f); + Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-280,200,80); + Active_HitBox ahb1 = new Active_HitBox(420,-250,120,120); + Active_HitBox ahb2 = new Active_HitBox(520,-330,120,120); + phb.add(phb1); + phb.add(phb2); + phb.add(phb3); + phb.add(phb5); + ahb.add(ahb1); + ahb.add(ahb2); - Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet f.setSpriteWrap((138*13),(138*3),138,138); return f; } - private static Frame JumpAFrame3() { + protected static Frame JumpAFrame3() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -1722,10 +1743,19 @@ public class BlueNormals { 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); + Push_HitBox pB1 = new Push_HitBox(200*1.25f,-20*1.25f,160*1.25f,400*1.25f); + Passive_HitBox phb1 = new Passive_HitBox(180*1.25f,-150*1.25f,170*1.25f,200*1.25f); + Passive_HitBox phb2 = new Passive_HitBox(210*1.25f,-400*1.25f,90*1.25f,80*1.25f); + Passive_HitBox phb3 = new Passive_HitBox(230*1.25f,-250*1.25f,140*1.25f,160*1.25f); + Passive_HitBox phb4 = new Passive_HitBox(230*1.25f,-100*1.25f,70*1.25f,50*1.25f); + Passive_HitBox phb5 = new Passive_HitBox(280*1.25f,-70*1.25f,70*1.25f,100*1.25f); + phb.add(phb1); + phb.add(phb2); + phb.add(phb3); + phb.add(phb4); + phb.add(phb5); - Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,bStandPB1,normalC,specialC,jumpC,moveC,dashC); + Frame f = new Frame(moveY,moveX,phb,ahb,pthb,athb,pB1,normalC,specialC,jumpC,moveC,dashC); //set sprite data on sheet f.setSpriteWrap((138*14),(138*3),138,138); @@ -1764,7 +1794,7 @@ public class BlueNormals { return new Attack(isSpecial,rS,cmd,parts); } - private static Frame JumpCFrame1() { + protected static Frame JumpCFrame1() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -1792,7 +1822,7 @@ public class BlueNormals { return f; } - private static Frame JumpCFrame2() { + protected static Frame JumpCFrame2() { //movement data double moveX = 0.0; double moveY = 0.0; @@ -1820,7 +1850,7 @@ public class BlueNormals { return f; } - private static Frame JumpCFrame3() { + protected static Frame JumpCFrame3() { //movement data double moveX = 0.0; double moveY = 0.0;