Beispiel #1
0
        } // end method MovePlayerShots

        /// <summary>
        /// This method moves the player in a certain direction.
        /// </summary>
        /// <param name="directionToMove">The direction you want the player to move.</param>
        public void MovePlayer(Direction directionToMove)
        {
            if (playerShip.Alive){
                if(!IsTouchingBorder(playerShip.Area, directionToMove, playerDistanceFromEdge))
                playerShip.Move(directionToMove);
            }
        } // end method MovePlayer
Beispiel #2
0
 public void MovePlayer(Direction direction, bool gameOver)
 {
     if (!gameOver)
     {
         playerShip.Move(direction);
     }
 }
Beispiel #3
0
 public void MovePlayer(Direction direction)
 {
     if (playerShip.Alive)
     {
         playerShip.Move(direction);
     }
 }
Beispiel #4
0
        } // end method MovePlayerShots

        /// <summary>
        /// This method moves the player in a certain direction.
        /// </summary>
        /// <param name="directionToMove">The direction you want the player to move.</param>
        public void MovePlayer(Direction directionToMove)
        {
            if (playerShip.Alive)
            {
                if (!WillTouchBorder(playerShip.Area, directionToMove, 10))
                {
                    playerShip.Move(directionToMove);
                }
            }
        } // end method MovePlayer