private void SetButtons() { GameObject.Find("ButtonPause").GetComponent <ButtonBhv>().EndActionDelegate = Pause; GameObject.Find("CharacterButton").GetComponent <ButtonBhv>().EndActionDelegate = ShowCharacterStats; GameObject.Find("ButtonInventory").GetComponent <ButtonBhv>().EndActionDelegate = ShowInventory; if (Constants.CardsInCache == true) { LoadCurrentCards(); } else { if (Journey.Step > Journey.Biome.Steps) //Just '<' because it instantiates one in advance { //++Journey.CurrentBiomeChoice; Instantiator.NewCardBiome(1, Journey.Day, Journey.Biome, Journey.CurrentBiomeChoice, Journey.Biome.Destinations, _playerCharacter); if (Journey.Biome.Destinations > 1 && Journey.CurrentBiomeChoice < Journey.Biome.Destinations) { //++Journey.CurrentBiomeChoice; Instantiator.NewCardBiome(0, Journey.Day, Journey.Biome, Journey.CurrentBiomeChoice + 1, Journey.Biome.Destinations, _playerCharacter); } else { _avoidBhv.DisableButton(); } } else { Instantiator.NewRandomCard(1, Journey.Day, Journey.Biome, _playerCharacter); if (Journey.Step < Journey.Biome.Steps) { Instantiator.NewRandomCard(0, Journey.Day, Journey.Biome, _playerCharacter); } else { Instantiator.NewCardBiome(0, Journey.Day, Journey.Biome, Journey.CurrentBiomeChoice, Journey.Biome.Destinations, _playerCharacter); } } } _currentCard = GameObject.Find("Card1"); _avoidBhv.EndActionDelegate = _currentCard.GetComponent <CardBhv>().Avoid; _ventureBhv.EndActionDelegate = _currentCard.GetComponent <CardBhv>().Venture; PauseMenu.Buttons[0].EndActionDelegate = Resume; PauseMenu.TextMeshes[0].text = "Resume"; PauseMenu.Buttons[1].EndActionDelegate = GiveUp; PauseMenu.TextMeshes[1].text = "Give Up"; PauseMenu.Buttons[2].EndActionDelegate = GoToSoul; PauseMenu.TextMeshes[2].text = "Soul"; PauseMenu.Buttons[3].EndActionDelegate = Settings; PauseMenu.TextMeshes[3].text = "Settings"; PauseMenu.Buttons[4].EndActionDelegate = Exit; PauseMenu.TextMeshes[4].text = "Exit"; if (!Soul.HasAtLeastOneLeveledStat()) { PauseMenu.Buttons[2].DisableButton(); } }