} // 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
public void MovePlayer(Direction direction, bool gameOver) { if (!gameOver) { playerShip.Move(direction); } }
public void MovePlayer(Direction direction) { if (playerShip.Alive) { playerShip.Move(direction); } }
} // 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