Removed swing hitbox graphic.

This commit is contained in:
Jeasonfire 2015-05-17 02:36:49 +03:00
parent 71d1001bbd
commit 508a20152c
5 changed files with 3 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -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();

View File

@ -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 {

View File

@ -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) {

View File

@ -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");