From ae64a9d0404c80b697dda193fd4ee0d273b3e0fd Mon Sep 17 00:00:00 2001 From: Thivan W Date: Wed, 11 Oct 2023 14:36:53 +1000 Subject: [PATCH] Fixed pierce tower hitbox and projectile --- .../csse3200/game/components/tasks/PierceTowerCombatTask.java | 2 +- .../main/com/csse3200/game/entities/factories/TowerFactory.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/components/tasks/PierceTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/PierceTowerCombatTask.java index 8d8723f65..8fd0986af 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/PierceTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/PierceTowerCombatTask.java @@ -112,7 +112,7 @@ public void updateTowerState() { Entity newProjectile = ProjectileFactory.createPierceFireBall(PhysicsLayer.NPC, new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f)); newProjectile.setPosition((float) (owner.getEntity().getPosition().x + 0.25), - (float) (owner.getEntity().getPosition().y + 0.25)); + (float) (owner.getEntity().getPosition().y)); ServiceLocator.getEntityService().register(newProjectile); } } diff --git a/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java index 13a349654..b017487cc 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/TowerFactory.java @@ -408,7 +408,6 @@ public static Entity createPierceTower() { .addComponent(aiTaskComponent); pierceTower.setScale(1.5f, 1.5f); - PhysicsUtils.setScaledCollider(pierceTower, 0.5f, 0.5f); return pierceTower; }