From 30f9e09a2f5d8bbaae74f781b03ef3f85ed19921 Mon Sep 17 00:00:00 2001 From: meganroxburgh <128758122+meganroxburgh@users.noreply.github.com> Date: Sun, 10 Sep 2023 13:14:22 +1000 Subject: [PATCH] Changed target to humans --- .../com/csse3200/game/components/tasks/MobAttackTask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java b/source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java index aff533638..b6722fb15 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java @@ -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"; @@ -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);