From 508a20152c593f3f9f2ac7632bfb15fe1374319a Mon Sep 17 00:00:00 2001 From: Jeasonfire Date: Sun, 17 May 2015 02:36:49 +0300 Subject: [PATCH] Removed swing hitbox graphic. --- core/assets/sprites/swinghitbox.png | Bin 2374 -> 0 bytes .../saltosion/gladiator/components/CCombat.java | 2 +- .../gladiator/listeners/SwingHitboxListener.java | 1 - .../gladiator/systems/CombatSystem.java | 7 ++----- .../saltosion/gladiator/util/SpriteLoader.java | 1 - 5 files changed, 3 insertions(+), 8 deletions(-) delete mode 100644 core/assets/sprites/swinghitbox.png diff --git a/core/assets/sprites/swinghitbox.png b/core/assets/sprites/swinghitbox.png deleted file mode 100644 index 59e08fd6e24628d0cca26df2ef2c8b0d647aab11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2374 zcmV-M3Ay%(P)?VkVu03B&m zSad^gZEa<4bN~PV002XBWnpw>WFU8GbZ8()Nlj2>E@cM*00^o{L_t(&-tAd?P?Xmd z|K0oTvWo=PDY}h-ilU2lK%8iXX0kRw)PzxNq@p2{#7WeV`kTOBhsRny5fDn65l zPGW2&Mp|v~NhE@%){0Y5G9o^rJS~bYBD>4(ckk&R%eLzlDH>A^?wR>!zB%{Yz4!jk zx#yhyeGH&PJjTNDn2R3(KLCCJ`~W;uAwm%miXJHdmMs%QYHMk^%|>}H7aeMCr5zV8 z&@bP4N5piu2w=W_z$c$b^DD2gWt=nC;RJ@HZhZwNOki(v&e+wfbaK%mF(WKYeK8?H zq<;FTeEZrpD)06=phpjc1Hfyq$=_Kl%Eg8TjkCB|vA+B=KVmepEN|OBebfM#iw+4v zhfO9m(4)6nX)_UutXBHaqcfS*Kq2U`%S8wK^icyk%K;u;WTdJ)f1a}2+Ni+cpxtF< zG=njDM`TW&D#B`OX@%2C`y3A1U0F$4k&&vdtGVUB0I=Ip4*<)Tv+-uLFmyJ#p+V!c zT2aY4V;LDd8URL)RD*+qF%STPgAo-MCxQTA=1gwloH45vl?@FVXIH#aQlk87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JjnZ#K;7q}v4r^4)|4k(!VoQVR;C#pxuQ(a45>{yG2Ii4#i8 zwrykqfaGL0RjU!zp#)t0>H3gZkvn@{`bmC`b%&y>$h_!8=aTOMh6G8 zzGY?jV|KQ3=ANp+-Lm?FE^BMo$}`?RShr4=zy3N$U?BPcKu{1O0Kj6Qhp4+$c%!dMi)9I$8ROm*&ZnS>}81$vBfq4P3QK4xcp1 zO=e!Ye zfD(;H*Vx8Jd7ADbjg9gjp`orZNlEHNheKM4h;nnqV$V9ec8TRgM0UHpX*R1bb#$ih zECOcDlIv?~sHClpT0GamR}vG&%Jb)GpVLV#E*ClK>gcQK)8)JqCzKYz{b3{~Ml3vb zOm1!`X`QM{ZOzSe>DV#(;n1OCQB#vf{pch93!RP`u3x8$>C^eY6J}Z(if-JXbM04Q so}Uo${}=EB;0M4DfFA%q0C&j00JJ;0!<1@wsQ>@~07*qoM6N<$f^E!g!~g&Q diff --git a/core/src/com/saltosion/gladiator/components/CCombat.java b/core/src/com/saltosion/gladiator/components/CCombat.java index ad6a0c4..b634f3b 100644 --- a/core/src/com/saltosion/gladiator/components/CCombat.java +++ b/core/src/com/saltosion/gladiator/components/CCombat.java @@ -13,7 +13,7 @@ public class CCombat extends Component { private int maxHealth = 0; private int damage = 0; private float swingForce = 20f; - private Vector2 swingsize = new Vector2(4, 3); + private Vector2 swingsize = new Vector2(3, 3); private CombatListener combatListener; private Vector2 swinging = new Vector2(); diff --git a/core/src/com/saltosion/gladiator/listeners/SwingHitboxListener.java b/core/src/com/saltosion/gladiator/listeners/SwingHitboxListener.java index 2d11bfa..693fb51 100644 --- a/core/src/com/saltosion/gladiator/listeners/SwingHitboxListener.java +++ b/core/src/com/saltosion/gladiator/listeners/SwingHitboxListener.java @@ -8,7 +8,6 @@ import com.saltosion.gladiator.components.CCombat; import com.saltosion.gladiator.components.CPhysics; import com.saltosion.gladiator.systems.CombatSystem; import com.saltosion.gladiator.util.Direction; -import com.saltosion.gladiator.util.Log; public class SwingHitboxListener implements CollisionListener { diff --git a/core/src/com/saltosion/gladiator/systems/CombatSystem.java b/core/src/com/saltosion/gladiator/systems/CombatSystem.java index a5f54e8..0c77494 100644 --- a/core/src/com/saltosion/gladiator/systems/CombatSystem.java +++ b/core/src/com/saltosion/gladiator/systems/CombatSystem.java @@ -81,14 +81,11 @@ public class CombatSystem extends EntitySystem { public void createSwingHitbox(Entity source, Direction direction, Vector2 position) { Entity e = new Entity(); CCombat combat = cm.get(source); - Sprite s = SpriteLoader.loadSprite(Name.SWINGHITBOXIMG); - e.add(new CRenderedObject(s)); e.add(new CPhysics().setGhost(true).setGravityApplied(false).setMovable(false) - .setSize(combat.getSwingSize())); - e.getComponent(CPhysics.class).setPosition(position).setCollisionListener(new SwingHitboxListener(source, direction)); + .setSize(combat.getSwingSize()).setPosition(position) + .setCollisionListener(new SwingHitboxListener(source, direction))); e.add(new CDestructive(combat.getSwingDuration() / 2)); AppUtil.engine.addEntity(e); - } public void updateEntities(Engine engine) { diff --git a/core/src/com/saltosion/gladiator/util/SpriteLoader.java b/core/src/com/saltosion/gladiator/util/SpriteLoader.java index 45b5bae..33b51e4 100644 --- a/core/src/com/saltosion/gladiator/util/SpriteLoader.java +++ b/core/src/com/saltosion/gladiator/util/SpriteLoader.java @@ -16,7 +16,6 @@ public class SpriteLoader { loadTexture(Name.PLAYERIMG, "sprites/player/player.png"); loadTexture(Name.GROUNDIMG, "sprites/ground.png"); loadTexture(Name.WALLIMG, "sprites/wall.png"); - loadTexture(Name.SWINGHITBOXIMG, "sprites/swinghitbox.png"); loadTexture(Name.AUDIENCEIMG, "sprites/audience.png"); loadTexture(Name.BUTTON_HUGE, "sprites/buttons/button_huge.png");