public void DeactiveGameUI() { CardSelectionScreen.SetActive(false); OpponentSelction.SetActive(false); GameBoardScreen.SetActive(false); EndGameScreen.SetActive(false); CardShop.SetActive(false); }
public void ToPreGameMenu() { _gameController.GameStage = 0; UpdatePlayerInfoBar(); GameBoardScreen.SetActive(false); CardSelectionScreen.SetActive(false); PreGameScreen.SetActive(true); PreGameScreen.transform.GetChild(1).gameObject.SetActive(true); }
void Start() { _endGameText = EndGameScreen.transform.GetChild(2).GetComponent <TextMeshProUGUI>(); _endGameTitleText = EndGameScreen.transform.GetChild(1).GetComponent <TextMeshProUGUI>(); _roundEndButton = EndGameScreen.transform.GetChild(4).GetChild(0).GetComponent <Button>(); _roundEndButtonText = _roundEndButton.GetComponentInChildren <TextMeshProUGUI>(); _cardSeletionButton = EndGameScreen.transform.GetChild(4).GetChild(1).GetComponent <Button>(); _gameController = GetComponent <GameController_script>(); _playerIndicatorBackground = new Image[2]; _playerIndicatorBackground[0] = PlayerIndicator[0].transform.parent.GetComponent <Image>(); _playerIndicatorBackground[1] = PlayerIndicator[1].transform.parent.GetComponent <Image>(); _endGameLeftPlayerText = EndGameScreen.transform.GetChild(3).GetChild(0).GetComponentsInChildren <TextMeshProUGUI>(); _endGameRightPlayerText = EndGameScreen.transform.GetChild(3).GetChild(1).GetComponentsInChildren <TextMeshProUGUI>(); _leftBoard = _gameController.LeftBoard; _rightBoard = _gameController.RightBoard; _leftPlayerName = PlayerIndicator[0].transform.parent.parent.GetChild(4).GetComponent <TextMeshProUGUI>(); _leftPlayerImages = PlayerIndicator[0].transform.parent.parent.GetChild(5).GetComponentsInChildren <Image>(); _preGamePlayerImages = PreGamePlayerGraphics.GetComponentsInChildren <Image>(); _rightPlayerName = PlayerIndicator[1].transform.parent.parent.GetChild(4).GetComponent <TextMeshProUGUI>(); _rightPlayerImage = PlayerIndicator[1].transform.parent.parent.GetChild(5).GetComponent <Image>(); _playerInfoBarName = PlayerInfoBar.transform.GetChild(1).GetComponent <TextMeshProUGUI>(); _playerInfoBarCredits = PlayerInfoBar.transform.GetChild(2).GetComponent <TextMeshProUGUI>(); _bettingInputfield = BetScreen.transform.GetChild(1).GetComponent <TMP_InputField>(); ResetUI(); GameBoardScreen.SetActive(false); CardSelectionScreen.SetActive(false); BetScreen.SetActive(false); StartScreen.SetActive(true); VersionText.text = "Work in progress v. " + Application.version; }