diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-04 16:18:17 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-09-04 16:18:17 -0300 |
| commit | 9953c9a5818baa392a48a4d18339c73f3b7a814e (patch) | |
| tree | 3484fbca78bfa217d84226cc774119fe054f6df9 /scripts/actors/actions/MovementAction.cs | |
| parent | 7dbe2bbe431f77deb3515e5cf0810cfa07215d59 (diff) | |
Prepare
Diffstat (limited to 'scripts/actors/actions/MovementAction.cs')
| -rw-r--r-- | scripts/actors/actions/MovementAction.cs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/scripts/actors/actions/MovementAction.cs b/scripts/actors/actions/MovementAction.cs deleted file mode 100644 index 3608357..0000000 --- a/scripts/actors/actions/MovementAction.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Godot; - -/// <summary> -/// Ação de movimento. Movimenta o ator para a direção de seu Offset. -/// </summary> -public partial class MovementAction : DirectionalAction -{ - public MovementAction(Actor actor, Vector2I offset) : base(actor, offset) - { - } - - public override void Perform() - { - // Não anda se o destino for um tile sólido. - if (!Map_Data.IsTileWalkable(Destination)) return; - - // Não anda se o destino for oculpado por um ator. - // Na maioria dos casos, essa condição nunca é verdadeira. - if (GetTargetActor() != null) return; - - actor.Walk(Offset); - actor.Energy -= cost; - } -} |
