Beispiel #1
0
    void OnRegisterPressed()
    {
        Debug.Log("clickedR");
        Base_UIPanel nextPanel = UIManager.instance.registerPanel;

        UIManager.instance.TriggerPanelTransition(nextPanel);
    }
Beispiel #2
0
    void OnBack()
    {
        Debug.Log("clicked");
        Base_UIPanel nextPanel = UIManager.instance.splashPanel;

        UIManager.instance.TriggerPanelTransition(nextPanel);
    }
Beispiel #3
0
    void OnLoginPressed()
    {
        Debug.Log("loginPressed");
        Base_UIPanel nextPanel = UIManager.instance.loginPanel;

        UIManager.instance.TriggerPanelTransition(nextPanel);
    }
    /*
     * Use Email Id and Password to Register a User in Firebase
     */

    public void RegisterWithEmail(string email, string password, System.Action <string> callback)
    {
        m_auth.CreateUserWithEmailAndPasswordAsync(email, password).ContinueWithOnMainThread(task =>
        {
            if (task.IsCanceled)
            {
                if (Debug.isDebugBuild)
                {
                    Debug.LogError("SignInWithEmailAndPassword was canceled.");
                }
                return;
            }
            else if (task.IsFaulted)
            {
                FirebaseException exception = task.Exception.InnerExceptions[0].InnerException as FirebaseException;
                var errCode = (AuthError)exception.ErrorCode;
                Debug.Log(errCode.ToString());
                callback(errCode.ToString());
                //Debug.LogError("SignInWithEmailAndPassword encountered an error: " + task.Exception);
                return;
            }
            else if (task.IsCompleted)
            {
                m_user = task.Result;
                Debug.LogFormat("User signed in successfully: {0} ({1})", m_user.DisplayName, m_user.UserId);

                Base_UIPanel nextPanel = UIManager.instance.profileSetupPanel;
                UIManager.instance.TriggerPanelTransition(nextPanel);
            }
        });
    }
Beispiel #5
0
 void TriggerOpenPanel(Base_UIPanel panel)
 {
     if (_currentPanel != null)
     {
         TriggerClosePanel(_currentPanel);
     }
     _currentPanel = panel;
     _currentPanel.OpenBehavior();
 }
Beispiel #6
0
 public void TriggerPanelTransition(Base_UIPanel panel)
 {
     if (panel == null)
     {
         TriggerClosePanel(_currentPanel);
         _currentPanel = null;
     }
     else
     {
         TriggerOpenPanel(panel);
     }
 }
Beispiel #7
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
            //DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }

        splashPanel         = Instantiate(_splashPanel, _splash).GetComponent <Base_UIPanel>();
        loginPanel          = Instantiate(_loginPanel, _auth).GetComponent <Base_UIPanel>();
        registerPanel       = Instantiate(_registerPanel, _auth).GetComponent <Base_UIPanel>();
        forgotPasswordPanel = Instantiate(_forgotPasswordPanel, _auth).GetComponent <Base_UIPanel>();
        profileSetupPanel   = Instantiate(_profileSetupPanel, _auth).GetComponent <Base_UIPanel>();
        termsPanel          = Instantiate(_termsPanel, _auth).GetComponent <Base_UIPanel>();
    }
Beispiel #8
0
    void OnForgotPassword()
    {
        Base_UIPanel nextPanel = UIManager.instance.forgotPasswordPanel;

        UIManager.instance.TriggerPanelTransition(nextPanel);
    }
Beispiel #9
0
    void OnBack()
    {
        Base_UIPanel nextPanel = UIManager.instance.splashPanel;

        UIManager.instance.TriggerPanelTransition(nextPanel);
    }
Beispiel #10
0
    void OnLoginClicked()
    {
        Base_UIPanel nextPanel = UIManager.instance.loginPanel;

        UIManager.instance.TriggerPanelTransition(nextPanel);
    }
Beispiel #11
0
 void TriggerClosePanel(Base_UIPanel panel)
 {
     panel.CloseBehavior();
 }
    void OnTermsConditions()
    {
        Base_UIPanel nextPanel = UIManager.instance.termsPanel;

        UIManager.instance.TriggerPanelTransition(nextPanel);
    }
Beispiel #13
0
 public void TriggerPanelTransition(Base_UIPanel panel)
 {
     TriggerOpenPanel(panel);
 }