From 2ed63124ef044a223fc9c7b660100c91af6f39b0 Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 28 Aug 2025 17:46:54 -0300 Subject: Mudança no sistema de turnos. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/actors/AI/HostileEnemyAI.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/actors/AI') 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 -- cgit v1.2.3