diff options
Diffstat (limited to 'scripts/Entities/Actors/AI/BaseAI.cs')
| -rw-r--r-- | scripts/Entities/Actors/AI/BaseAI.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/Entities/Actors/AI/BaseAI.cs b/scripts/Entities/Actors/AI/BaseAI.cs index bdd1e61..3b9ae3e 100644 --- a/scripts/Entities/Actors/AI/BaseAI.cs +++ b/scripts/Entities/Actors/AI/BaseAI.cs @@ -20,13 +20,13 @@ public abstract partial class BaseAI : Node /// Corpo controlado pela IA. /// O corpo é a marionete da alma. /// </summary> - protected Actor Body { get; set; } + protected Actor body; public override void _Ready() { base._Ready(); // Por padrão, a IA é filha do nó de seu corpo. - Body = GetParent<Actor>(); + body = GetParent<Actor>(); } /// <summary> @@ -42,12 +42,12 @@ public abstract partial class BaseAI : Node /// </summary> /// <param name="destination">Destino</param> /// <returns>Vetor com vetores, passo a passo para chegar no destino.</returns> - public Godot.Collections.Array<Vector2> GetPathTo(Vector2I destination) + protected Godot.Collections.Array<Vector2> GetPathTo(Vector2I destination) { // Arrays do Godot são muito mais confortáveis de manipular, então // eu converto o Array do C# em um array do Godot antes de retornar o caminho. Godot.Collections.Array<Vector2> list = []; - Vector2[] path = Body.MapData.Pathfinder.GetPointPath(Body.GridPosition, destination); + Vector2[] path = body.MapData.Pathfinder.GetPointPath(body.GridPosition, destination); list.AddRange(path); return list; } |
