Пример #1
0
        private async void OnTutorialButtonClick()
        {
            this.transform.Find("Container").gameObject.SetActive(false);
            SinglePlayerGameData data = await LobbyServerApi.CreateTutorialGame();

            Main.StartTutorialGame(data.gameServerId, data.playerId, data.aiId);
        }
Пример #2
0
        private async void OnButtonClick(GameObject deckButton)
        {
            var value = deckButton.GetComponent <ButtonValue>().value;

            if (ChooseDeck.isSinglePlayer)
            {
                this.transform.Find("Decs").gameObject.SetActive(false);
                SinglePlayerGameData data = await LobbyServerApi.CreateSinglePlayerGame(value);

                Main.StartGame(data.gameServerId, data.playerId, data.aiId);
            }
            else
            {
                FindingOpponent.deckId = value;
                SceneManager.LoadScene("FindingOpponent");
            }
        }