From 29347b02e8657b6262105ac77a0da678cfca9f8f Mon Sep 17 00:00:00 2001 From: gregchan550 Date: Fri, 6 Oct 2023 13:30:37 +1000 Subject: [PATCH] got rid of collider component for bosses --- .../entities/factories/MobBossFactory.java | 4 +-- .../factories/MobBossFactoryTest.java | 30 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/entities/factories/MobBossFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/MobBossFactory.java index c046b0fc6..319738449 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/MobBossFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/MobBossFactory.java @@ -285,12 +285,12 @@ public static Entity createMobBoss2() { public static Entity createBaseBoss() { Entity boss = new Entity() .addComponent(new PhysicsComponent()) - .addComponent(new ColliderComponent()) +// .addComponent(new ColliderComponent()) .addComponent(new PhysicsMovementComponent()) .addComponent(new HitboxComponent().setLayer(PhysicsLayer.NPC)) .addComponent(new TouchAttackComponent(PhysicsLayer.HUMANS, 1.5f)); - PhysicsUtils.setScaledCollider(boss, 0.9f, 0.4f); +// PhysicsUtils.setScaledCollider(boss, 0.9f, 0.4f); return boss; } diff --git a/source/core/src/test/com/csse3200/game/entities/factories/MobBossFactoryTest.java b/source/core/src/test/com/csse3200/game/entities/factories/MobBossFactoryTest.java index 1c961242c..07d3fedb7 100644 --- a/source/core/src/test/com/csse3200/game/entities/factories/MobBossFactoryTest.java +++ b/source/core/src/test/com/csse3200/game/entities/factories/MobBossFactoryTest.java @@ -161,21 +161,21 @@ public void testMobBossPhysicsComponent() { "Ice Baby Boss does not have physics component."); } - @Test - public void testMobBossColliderComponent() { - assertNotNull(baseBoss.getComponent(ColliderComponent.class), - "Base Boss does not have collider component."); - assertNotNull(demon.getComponent(ColliderComponent.class), - "Demon Boss does not have collider component."); - assertNotNull(slimeyBoy.getComponent(ColliderComponent.class), - "Slimey Boy does not have collider component."); - assertNotNull(patrick.getComponent(ColliderComponent.class), - "Patrick Boss does not have collider component."); - assertNotNull(deadPatrick.getComponent(ColliderComponent.class), - "Dead Patrick Boss does not have collider component."); - assertNotNull(iceBaby.getComponent(ColliderComponent.class), - "Ice Baby Boss does not have collider component."); - } +// @Test +// public void testMobBossColliderComponent() { +// assertNotNull(baseBoss.getComponent(ColliderComponent.class), +// "Base Boss does not have collider component."); +// assertNotNull(demon.getComponent(ColliderComponent.class), +// "Demon Boss does not have collider component."); +// assertNotNull(slimeyBoy.getComponent(ColliderComponent.class), +// "Slimey Boy does not have collider component."); +// assertNotNull(patrick.getComponent(ColliderComponent.class), +// "Patrick Boss does not have collider component."); +// assertNotNull(deadPatrick.getComponent(ColliderComponent.class), +// "Dead Patrick Boss does not have collider component."); +// assertNotNull(iceBaby.getComponent(ColliderComponent.class), +// "Ice Baby Boss does not have collider component."); +// } @Test public void testMobBossPhysicsMovementComponent() {