/// <summary> /// Perform an action for the player. Modifies the ITileFieldPlayer appropriately /// </summary> /// <param name="player">The player that is performing the action</param> /// <param name="action">The action to perform</param> public virtual void PerformAction(ITileFieldPlayer player, PlayerAction action) { player.LastAction = action; if (action.IsDirection()) { player.MoveSmoothly(action.ToDirection()); } }
public override void PerformAction(ITileFieldPlayer player, PlayerAction action) { if (!TileField.GetTile(Location + lastDirection.ToPoint()).StopsSliding) { player.MoveSmoothly(lastDirection); } else { base.PerformAction(player, action); } }