Beispiel #1
0
    public void JoinClass()
    {
        name = ui.nameName.text;

        if (!string.IsNullOrEmpty(name))
        {
            ui.NameHideError();

            ui.loadingPage.SetActive(true);
            aws.JoinClass(classID, name, valid => {
                ui.loadingPage.SetActive(false);

                if (valid)
                {
                    ui.gameTitle.SetText(classID);
                    ui.PageGame();

                    inGame = true;
                }
                else
                {
                    ui.NameShowError("Name Already Taken");
                }
            }, exception => {
                ui.loadingPage.SetActive(false);
                Debug.LogError(exception);
            });
        }
        else
        {
            ui.NameShowError("Name Empty");
        }
    }