From 240156765d88db25dd092fc320005cdb5f28d7a7 Mon Sep 17 00:00:00 2001 From: Matheus Date: Sun, 17 Aug 2025 21:45:07 -0300 Subject: Refactor no sistema de ações MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/actors/actions/BumpAction.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts/actors/actions/BumpAction.cs') diff --git a/scripts/actors/actions/BumpAction.cs b/scripts/actors/actions/BumpAction.cs index e1fb706..5958b11 100644 --- a/scripts/actors/actions/BumpAction.cs +++ b/scripts/actors/actions/BumpAction.cs @@ -3,22 +3,22 @@ using System; public partial class BumpAction : DirectionalAction { - public BumpAction(Vector2I offset) : base(offset) + public BumpAction(Actor actor, Vector2I offset) : base(actor, offset) { } - public override void Perform(Game game, Actor actor) + public override void Perform() { Vector2I destination = actor.GridPosition + Offset; Action action; - if (game.Map.GetBlockingActorAtPosition(destination) != null) { - action = new MeleeAction(Offset); + if (GetBlockingActorAtPosition(destination) != null) { + action = new MeleeAction(actor, Offset); } else { - action = new MovementAction(Offset); + action = new MovementAction(actor, Offset); } - action.Perform(game, actor); + action.Perform(); } } -- cgit v1.2.3