예제 #1
0
파일: Tile.cs 프로젝트: jensj12/MeesGame
 /// <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());
     }
 }
예제 #2
0
 public override void PerformAction(ITileFieldPlayer player, PlayerAction action)
 {
     if (!TileField.GetTile(Location + lastDirection.ToPoint()).StopsSliding)
     {
         player.MoveSmoothly(lastDirection);
     }
     else
     {
         base.PerformAction(player, action);
     }
 }