diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-04 16:58:58 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-04 16:58:58 -0300 |
| commit | 6f2c2edd52171a4df7f35de695c9b2e7801d3e5f (patch) | |
| tree | 509002136987182309a934623b19d19393e306e3 /scripts/Time/TurnManager.cs | |
| parent | 9953c9a5818baa392a48a4d18339c73f3b7a814e (diff) | |
Preparação para itens
Diffstat (limited to 'scripts/Time/TurnManager.cs')
| -rw-r--r-- | scripts/Time/TurnManager.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/Time/TurnManager.cs b/scripts/Time/TurnManager.cs index cbf1176..fd16f0f 100644 --- a/scripts/Time/TurnManager.cs +++ b/scripts/Time/TurnManager.cs @@ -78,8 +78,8 @@ public partial class TurnManager : RefCounted TurnCount++; // Recarregamos a energia de todos os atores. - foreach (Actor actor in Map_Data.Actors) { - if (actor.IsAlive) { + foreach (Entity entity in Map_Data.Entities) { + if (entity is Actor actor && actor.IsAlive) { actor.RechargeEnergy(); } } @@ -89,11 +89,11 @@ public partial class TurnManager : RefCounted /// Executa turnos para cada ator no mapa. /// </summary> private void HandleEnemyTurns() { - foreach (Actor actor in Map_Data.Actors) { - if (actor is Player) continue; + foreach (Entity entity in Map_Data.Entities) { + if (entity is Player) continue; // Se o ator for um inimigo e estiver vivo, deixamos // que sua IA faça um turno. - if (actor is Enemy enemy && enemy.IsAlive) { + if (entity is Enemy enemy && enemy.IsAlive) { // O inimigo poderá fazer quantos turnos sua energia deixar. while (enemy.Energy > 0) { enemy.Soul.Perform(); |
