Removed swing hitbox graphic.
This commit is contained in:
parent
71d1001bbd
commit
508a20152c
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
@ -13,7 +13,7 @@ public class CCombat extends Component {
|
|||||||
private int maxHealth = 0;
|
private int maxHealth = 0;
|
||||||
private int damage = 0;
|
private int damage = 0;
|
||||||
private float swingForce = 20f;
|
private float swingForce = 20f;
|
||||||
private Vector2 swingsize = new Vector2(4, 3);
|
private Vector2 swingsize = new Vector2(3, 3);
|
||||||
private CombatListener combatListener;
|
private CombatListener combatListener;
|
||||||
|
|
||||||
private Vector2 swinging = new Vector2();
|
private Vector2 swinging = new Vector2();
|
||||||
|
@ -8,7 +8,6 @@ import com.saltosion.gladiator.components.CCombat;
|
|||||||
import com.saltosion.gladiator.components.CPhysics;
|
import com.saltosion.gladiator.components.CPhysics;
|
||||||
import com.saltosion.gladiator.systems.CombatSystem;
|
import com.saltosion.gladiator.systems.CombatSystem;
|
||||||
import com.saltosion.gladiator.util.Direction;
|
import com.saltosion.gladiator.util.Direction;
|
||||||
import com.saltosion.gladiator.util.Log;
|
|
||||||
|
|
||||||
public class SwingHitboxListener implements CollisionListener {
|
public class SwingHitboxListener implements CollisionListener {
|
||||||
|
|
||||||
|
@ -81,14 +81,11 @@ public class CombatSystem extends EntitySystem {
|
|||||||
public void createSwingHitbox(Entity source, Direction direction, Vector2 position) {
|
public void createSwingHitbox(Entity source, Direction direction, Vector2 position) {
|
||||||
Entity e = new Entity();
|
Entity e = new Entity();
|
||||||
CCombat combat = cm.get(source);
|
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)
|
e.add(new CPhysics().setGhost(true).setGravityApplied(false).setMovable(false)
|
||||||
.setSize(combat.getSwingSize()));
|
.setSize(combat.getSwingSize()).setPosition(position)
|
||||||
e.getComponent(CPhysics.class).setPosition(position).setCollisionListener(new SwingHitboxListener(source, direction));
|
.setCollisionListener(new SwingHitboxListener(source, direction)));
|
||||||
e.add(new CDestructive(combat.getSwingDuration() / 2));
|
e.add(new CDestructive(combat.getSwingDuration() / 2));
|
||||||
AppUtil.engine.addEntity(e);
|
AppUtil.engine.addEntity(e);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateEntities(Engine engine) {
|
public void updateEntities(Engine engine) {
|
||||||
|
@ -16,7 +16,6 @@ public class SpriteLoader {
|
|||||||
loadTexture(Name.PLAYERIMG, "sprites/player/player.png");
|
loadTexture(Name.PLAYERIMG, "sprites/player/player.png");
|
||||||
loadTexture(Name.GROUNDIMG, "sprites/ground.png");
|
loadTexture(Name.GROUNDIMG, "sprites/ground.png");
|
||||||
loadTexture(Name.WALLIMG, "sprites/wall.png");
|
loadTexture(Name.WALLIMG, "sprites/wall.png");
|
||||||
loadTexture(Name.SWINGHITBOXIMG, "sprites/swinghitbox.png");
|
|
||||||
loadTexture(Name.AUDIENCEIMG, "sprites/audience.png");
|
loadTexture(Name.AUDIENCEIMG, "sprites/audience.png");
|
||||||
|
|
||||||
loadTexture(Name.BUTTON_HUGE, "sprites/buttons/button_huge.png");
|
loadTexture(Name.BUTTON_HUGE, "sprites/buttons/button_huge.png");
|
||||||
|
Loading…
Reference in New Issue
Block a user