summaryrefslogtreecommitdiff
path: root/scripts/actors/Enemy.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-08-28 00:38:48 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-08-28 00:38:48 -0300
commit2fb787a744d4f7a37d81233d2913a5ef39122f73 (patch)
treef9595d6757203146aa8201a86275c2c842bae03b /scripts/actors/Enemy.cs
parent6c7e2ac133986efa57b43df52a5498c6f7efcf75 (diff)
Comentarios
Diffstat (limited to 'scripts/actors/Enemy.cs')
-rw-r--r--scripts/actors/Enemy.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/actors/Enemy.cs b/scripts/actors/Enemy.cs
index 6c111b1..03fe309 100644
--- a/scripts/actors/Enemy.cs
+++ b/scripts/actors/Enemy.cs
@@ -1,16 +1,29 @@
using Godot;
using System;
+/// <summary>
+/// Enum das diferentes IAs disponíveis.
+/// </summary>
public enum AIType
{
None,
DefaultHostile
};
+/// <summary>
+/// Um inimigo é uma espécie de ator que é
+/// hostil ao jogador. Inimigos são controlados por IA.
+/// </summary>
public partial class Enemy : Actor
{
+ /// <summary>
+ /// A alma do ator. Gera ações que são executadas todo turno.
+ /// </summary>
public BaseAI Soul { get; private set; }
+ /// <summary>
+ /// Enquanto a alma controlar o corpo, o ser continua vivo.
+ /// </summary>
public bool IsAlive { get => Soul != null; }
public Enemy(Vector2I initialPosition, MapData map, EnemyDefinition definition) : base(initialPosition, map, definition)
@@ -18,10 +31,17 @@ public partial class Enemy : Actor
SetDefinition(definition);
}
+ /// <summary>
+ /// Além de definir as características gerais de um ator,
+ /// também define qual IA utilizar.
+ /// </summary>
+ /// <param name="definition">Definição do inimigo.</param>
public void SetDefinition(EnemyDefinition definition)
{
+ // Definimos as características do ator.
base.SetDefinition(definition);
+ // Definimos qual IA utilizar.
switch(definition.AI) {
case AIType.None:
break;