diff options
Diffstat (limited to 'scripts/actors/Actor.cs')
| -rw-r--r-- | scripts/actors/Actor.cs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/actors/Actor.cs b/scripts/actors/Actor.cs index afa6989..06cfd69 100644 --- a/scripts/actors/Actor.cs +++ b/scripts/actors/Actor.cs @@ -6,10 +6,22 @@ using Godot; [GlobalClass] public abstract partial class Actor : Sprite2D { + /// <summary> + /// Sinal emitido toda vez que o HP mudar. + /// </summary> + /// <param name="hp">Novo HP</param> + /// <param name="maxHp">Quantidade máxima de HP.</param> [Signal] public delegate void HealthChangedEventHandler(int hp, int maxHp); /// <summary> + /// Sinal emitido se o ator morrer. + /// </summary> + [Signal] + public delegate void DiedEventHandler(); + + + /// <summary> /// A definição do ator possui caracterísitcas padrões que definem /// o ator em questão. /// </summary> @@ -229,7 +241,8 @@ public abstract partial class Actor : Sprite2D Texture = definition.deathTexture; blocksMovement = false; ZIndex = 0; - actorName = $"Restos mortais de ${actorName}"; + actorName = $"Restos mortais de {actorName}"; Map_Data.UnregisterBlockingActor(this); + EmitSignal(SignalName.Died); } }
\ No newline at end of file |
