summaryrefslogtreecommitdiff
path: root/scripts/Time/TurnManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Time/TurnManager.cs')
-rw-r--r--scripts/Time/TurnManager.cs10
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();