diff options
Diffstat (limited to 'scripts/actors/actions/MovementAction.cs')
| -rw-r--r-- | scripts/actors/actions/MovementAction.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/actors/actions/MovementAction.cs b/scripts/actors/actions/MovementAction.cs index 3b203ca..c9474b0 100644 --- a/scripts/actors/actions/MovementAction.cs +++ b/scripts/actors/actions/MovementAction.cs @@ -3,17 +3,17 @@ using System; public partial class MovementAction : DirectionalAction { - public MovementAction(Vector2I offset) : base(offset) + public MovementAction(Actor actor, Vector2I offset) : base(actor, offset) { } - public override void Perform(Game game, Actor actor) + public override void Perform() { Vector2I finalDestination = actor.GridPosition + Offset; - if (!game.Map.IsTileWalkable(finalDestination)) return; + if (!Map.IsTileWalkable(finalDestination)) return; - if (game.Map.GetBlockingActorAtPosition(finalDestination) != null) return; + if (GetBlockingActorAtPosition(finalDestination) != null) return; actor.Walk(Offset); } |
