Exemple #1
0
 public void InvokeLoginBtn()
 {
     if (email_inputfield.text != "" && password_inputfield.text != "")
     {
         AuthController authController = new AuthController();
         string         temp1          = email_inputfield.text;
         string         temp2          = password_inputfield.text;
         authController.AuthUser(temp1, temp2);
         _dataBridge = DataBridge.GetInstance();
         _dataBridge.ReadPlayer();
         if (DataBridge.playerEmail == null || Player.singletonPlayer == null)
         {
             EditorUtility.DisplayDialog("Waiting", "Waiting for response from authentication server, please try again.", "Close");
             return;
         }
         ClearInputfield();
         SceneManager.LoadScene(0);
         Debug.Log(Player.singletonPlayer.company);
         Debug.Log(Player.singletonPlayer.email);
         Debug.Log(Player.singletonPlayer.balance);
     }
     else
     {
         EditorUtility.DisplayDialog("Error", "Fill in all details to login", "Close");
     }
 }