Skip to content

Commit

Permalink
Fixed if statement for detecting layers in slowEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
gregchan550 committed Sep 9, 2023
1 parent 28bd40f commit 6b0f06e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ private void slowEffect(Entity targetEntity) {
float ySpeed = 0;

// Create a timer task to apply the effect repeatedly
if (!PhysicsLayer.contains(PhysicsLayer.HUMANS, targetEntity.getComponent(HitboxComponent.class).getLayer())) {
if (PhysicsLayer.contains(PhysicsLayer.HUMANS, targetEntity.getComponent(HitboxComponent.class).getLayer())) {
// towers
towerFlag = true;
//targetEntity.getEvents().trigger("upgradeTower", TowerUpgraderComponent.UPGRADE.FIRERATE, -30);
} else if (!PhysicsLayer.contains(PhysicsLayer.NPC, targetEntity.getComponent(HitboxComponent.class).getLayer())) {
} else if (PhysicsLayer.contains(PhysicsLayer.NPC, targetEntity.getComponent(HitboxComponent.class).getLayer())) {
// mobs
mobFlag = true;
targetPhysics = targetEntity.getComponent(PhysicsMovementComponent.class);
Expand Down

0 comments on commit 6b0f06e

Please sign in to comment.