Esempio n. 1
0
        public void OnLoginClick()
        {
            SetInteractive(false);
            LoadPlayerFile(nameField.text);

            PlayerSave.current.OnLoginFinished += (sender, e) => GameInfo.info.RunOnMainThread(() =>
            {
                SetInteractive(true);
                if (!e.Error)
                {
                    LoginFinished();
                }
                else
                {
                    ErrorWindow errorWindow = (ErrorWindow)GameMenu.SingletonInstance.AddWindow(Window.ERROR);
                    errorWindow.SetText(e.ErrorText);
                }
            });
            PlayerSave.current.StartLogin(passField.text);
        }