From cba4021ef637ba61d09fb03d662ba345aa3d0135 Mon Sep 17 00:00:00 2001 From: ThivanW <140519988+ThivanW@users.noreply.github.com> Date: Sat, 9 Sep 2023 16:53:04 +1000 Subject: [PATCH] Changed the createFireBall code to match what is called in the main branch --- .../csse3200/game/components/tasks/RangeBossMovementTask.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/core/src/main/com/csse3200/game/components/tasks/RangeBossMovementTask.java b/source/core/src/main/com/csse3200/game/components/tasks/RangeBossMovementTask.java index 1c6897069..87f51b1a3 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/RangeBossMovementTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/RangeBossMovementTask.java @@ -7,6 +7,7 @@ import com.csse3200.game.entities.Entity; import com.csse3200.game.entities.factories.ProjectileFactory; import com.csse3200.game.services.ServiceLocator; +import com.csse3200.game.physics.PhysicsLayer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,7 +58,8 @@ public void start() { public void update() { if (currentTask.getStatus() != Status.ACTIVE) { if (currentTask == movementTask) { - Entity newProjectile = ProjectileFactory.createFireBall(owner.getEntity(), new Vector2(0, (currentPos.y + 0.75f)), new Vector2(2f,2f)); + Entity newProjectile = ProjectileFactory.createFireBall(PhysicsLayer.OBSTACLE, new Vector2(0, currentPos.y + 0.75f), new Vector2(2f,2f)); + newProjectile.scaleHeight(-0.4f); newProjectile.setPosition((float) (currentPos.x), (float) (currentPos.y+0.75f)); ServiceLocator.getEntityService().register(newProjectile);