Skip to content

Commit

Permalink
Changed target to humans
Browse files Browse the repository at this point in the history
  • Loading branch information
meganroxburgh committed Sep 10, 2023
1 parent a623e81 commit 30f9e09
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
public class MobAttackTask extends DefaultTask implements PriorityTask {
private static final int INTERVAL = 1; // time interval to scan for towers in
private static final short TARGET = PhysicsLayer.OBSTACLE; // mobs detecting for towers
private static final short TARGET = PhysicsLayer.HUMANS; // mobs detecting for towers
// ^ fix this

private static final String STOW = "wanderStart";
Expand Down Expand Up @@ -125,7 +125,7 @@ public void updateMobState() {
//owner.getEntity().getEvents().trigger(STOW);
mobState = STATE.STOW;
} else {
Entity newProjectile = ProjectileFactory.createMobBall(PhysicsLayer.HUMANS, new Vector2(0, owner.getEntity().getPosition().y), new Vector2(2f,2f));
Entity newProjectile = ProjectileFactory.createMobBall(TARGET, new Vector2(0, owner.getEntity().getPosition().y), new Vector2(2f,2f));
newProjectile.setPosition((float) (owner.getEntity().getPosition().x), (float) (owner.getEntity().getPosition().y));
newProjectile.setScale(-1f, 0.5f);
ServiceLocator.getEntityService().register(newProjectile);
Expand Down

0 comments on commit 30f9e09

Please sign in to comment.