summaryrefslogtreecommitdiff
path: root/scripts/actors/actions/MovementAction.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/actors/actions/MovementAction.cs')
-rw-r--r--scripts/actors/actions/MovementAction.cs24
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;
- }
-}