コード例 #1
0
 private void SwitchToLoginPanel() {
     FailedToLoginText.SetActive(false);
     PleaseLoginWithFacebookText.SetActive(false);
     ConnectingText.SetActive(false);
     loginPanel.SetActive(true);
     mainMenuPanel.SetActive(false);
     NetworkDatabase.NDB.OnLoggedIn += () => { shouldSwitch = true; return true; };
 }
コード例 #2
0
    public void LoginClicked() {
        FailedToLoginText.SetActive(false);
        PleaseLoginWithFacebookText.SetActive(false);
        ConnectingText.SetActive(true);

        new Thread(delegate () {
            if (NetworkDatabase.NDB.TryLogin())
                sucessConnect = true;
            else
                failedConnect = true;
        }).Start();
    }
コード例 #3
0
 private void Update() {
     if (shouldSwitch) {
         loginPanel.SetActive(false);
         mainMenuPanel.SetActive(true);
         shouldSwitch = false;
     }
     if (failedConnect) {
         ConnectingText.SetActive(false);
         FailedToLoginText.SetActive(true);
         failedConnect = false;
     }
     if (sucessConnect) {
         ConnectingText.SetActive(false);
         PleaseLoginWithFacebookText.SetActive(true);
         sucessConnect = false;
     }
     if (logout) {
         LogoutClicked();
         logout = false;
     }
 }