/// <summary> /// Overloaded Method -- Player does not have flashlight /// </summary> public void SearchLocation(bool flashlightStatus, bool searched, Sound flashlight) { int searchTime = 0; string messageBoxText = ""; Location currentLocation = _gameUniverse.GetLocationById(_gamePlayer.LocationID); if (searched == false) { if (flashlightStatus == false) { searchTime = 3600; HandleSearch(searchTime); } else { searchTime = 1800; flashlight.playSound(false); HandleSearch(searchTime); flashlight.playSound(false); Pause(500); } currentLocation.Searched = true; } else { messageBoxText += "--This Location has already been searched--" + Environment.NewLine + Environment.NewLine; } // List of a game objects in the location List <GameObject> gameObjectsInCurrentLocation = _gameUniverse.GetGameObjectsByLocationId(_gamePlayer.LocationID); //List of NPCs at the location List <Npc> npcsInCurrentLocation = _gameUniverse.GetNpcByLocation(_gamePlayer.LocationID); //Get general contents in room and list of objects in location messageBoxText += Text.SearchRoom(currentLocation) + Environment.NewLine + Environment.NewLine; messageBoxText += Text.GameObjectsViewList(gameObjectsInCurrentLocation); messageBoxText += Text.NpcChooseList(npcsInCurrentLocation); //Display the location info Location current = _gameUniverse.GetLocationById(_gamePlayer.LocationID); DisplayGamePlayScreen(current.Name, messageBoxText, ActionMenu.MainMenu, ""); }
private void GameIntroduction() { _menuMusic.playSound(true); // display splash screen _playingGame = _gameConsoleView.DisplaySpashScreen(); if (!_playingGame) { Environment.Exit(1); } //Get game difficulty int x = SetUpGameDifficulty(); _gameDifficulty = (GameDifficulty.Difficulty)x; // display introductory message _gameConsoleView.DisplayGamePlayScreen("Introduction", Text.Introduction(), ActionMenu.Introduction, ""); _gameConsoleView.GetContinueKey(); //Get Player info InitializeMission(); _menuMusic.stopSound(true); _thunder.playSound(true); Rules(); AssignXP(); //Assign Random Key Location GameObject gameObject = _gameUniverse.GetGameObjectById(5); PlayerObject Key = (PlayerObject)gameObject; Key.LocationId = _gameUniverse.AssignRandomLocation(Key); //Set Initial location _currentLocation = _gameUniverse.GetLocationById(_gamePlayer.LocationID); //Display Current Location _gameConsoleView.DisplayGamePlayScreen(_currentLocation.Name, Text.IntroLocationInfo(), ActionMenu.MainMenu, ""); }