diff --git a/core/assets/sprites/swinghitbox.png b/core/assets/sprites/swinghitbox.png deleted file mode 100644 index 59e08fd..0000000 Binary files a/core/assets/sprites/swinghitbox.png and /dev/null differ 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");