Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ufocoder committed Jun 1, 2024
1 parent b893734 commit d9d2bcb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/scenes/LevelScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,27 @@ export default class LevelScene implements BaseScene {
this.level.exit.y
);
}

const enemies = this.ecs.query([EnemyComponent, HealthComponent]);

for (const enemy of enemies) {
if (this.ecs.getComponents(enemy).get(HealthComponent).current > 0) {
return false
return false;
}
}

return true;
}

shouldLevelBeFailed() {

const [player] = this.ecs.query([CameraComponent]);
const playerContainer = this.ecs.getComponents(player);

if (!playerContainer) {
return;
}

return playerContainer.get(HealthComponent).current <= 0
return playerContainer.get(HealthComponent).current <= 0;
}

onTick = (dt: number) => {
Expand Down

0 comments on commit d9d2bcb

Please sign in to comment.