summaryrefslogtreecommitdiff
path: root/scripts/actors/AI
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-08-28 17:46:54 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-08-28 17:46:54 -0300
commit2ed63124ef044a223fc9c7b660100c91af6f39b0 (patch)
treeea0887e9aec0f88cea1979877f325faf6024a444 /scripts/actors/AI
parente17510951f1136f4afeb2afbf76c47df151b299b (diff)
Mudança no sistema de turnos.
Diffstat (limited to 'scripts/actors/AI')
-rw-r--r--scripts/actors/AI/HostileEnemyAI.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/actors/AI/HostileEnemyAI.cs b/scripts/actors/AI/HostileEnemyAI.cs
index 3989004..af87360 100644
--- a/scripts/actors/AI/HostileEnemyAI.cs
+++ b/scripts/actors/AI/HostileEnemyAI.cs
@@ -47,6 +47,8 @@ public partial class HostileEnemyAI : BaseAI
Vector2I destination = (Vector2I) path[0];
// Se tiver um outro ator no caminho, paramos o nosso turno aqui.
if (body.Map_Data.GetBlockingActorAtPosition(destination) != null) {
+ action = new WaitAction(body);
+ action.Perform();
return;
}
@@ -55,6 +57,12 @@ public partial class HostileEnemyAI : BaseAI
action.Perform();
// Podemos remover o passo do caminho.
path.RemoveAt(0);
+ return;
}
+
+ // Senão, espere.
+ action = new WaitAction(body);
+ action.Perform();
+ return;
}
} \ No newline at end of file