Skip to content

Commit

Permalink
got rid of collider component for bosses
Browse files Browse the repository at this point in the history
  • Loading branch information
gregchan550 committed Oct 6, 2023
1 parent eef36b9 commit 29347b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 29347b0

Please sign in to comment.