From e303bd526abd32ebc1cc8d2aed224f307cd10d22 Mon Sep 17 00:00:00 2001 From: max9753 Date: Mon, 11 Sep 2023 09:45:05 +1000 Subject: [PATCH 1/2] Removed MobDeathTask.java use from NPCFactory.java as it is not longer used or maintained. --- .../main/com/csse3200/game/entities/factories/NPCFactory.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java index 31485fe72..869cdfbdd 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java @@ -143,8 +143,7 @@ public static Entity createBaseNPC(Entity target) { AITaskComponent aiComponent = new AITaskComponent() .addTask(new WanderTask(new Vector2(2f, 2f), 2f)) - .addTask(new MobAttackTask(2, 40)) - .addTask(new MobDeathTask(2)); + .addTask(new MobAttackTask(2, 40)); Entity npc = new Entity() .addComponent(new PhysicsComponent()) From 4beb796ef975cc4394dd828398cb16d683dd74a1 Mon Sep 17 00:00:00 2001 From: max9753 Date: Mon, 11 Sep 2023 12:11:44 +1000 Subject: [PATCH 2/2] Removed several unused statements which were added for mob death from WanderTask.java --- .../src/main/com/csse3200/game/components/tasks/WanderTask.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/components/tasks/WanderTask.java b/source/core/src/main/com/csse3200/game/components/tasks/WanderTask.java index 088d32775..f02852bdb 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/WanderTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/WanderTask.java @@ -82,8 +82,6 @@ public void update() { // with section, massive props to him for his help! if (!isDead && owner.getEntity().getComponent(CombatStatsComponent.class).isDead()) { owner.getEntity().getEvents().trigger("dieStart"); - //owner.getEntity().getComponent(ColliderComponent.class).setLayer(PhysicsLayer.NONE); - //owner.getEntity().getComponent(HitboxComponent.class).setLayer(PhysicsLayer.NONE); currentTask.stop(); isDead = true; }