Exemple #1
0
    // Invoked when any sign in operation has completed
    private void DidLogin(Gamer newGamer)
    {
        if (Gamer != null)
        {
            Debug.LogWarning("Current gamer " + Gamer.GamerId + " has been dismissed");
            Loop.Stop();
        }
        Gamer = newGamer;
        Loop  = Gamer.StartEventLoop();
        Loop.ReceivedEvent += Loop_ReceivedEvent;
        Debug.Log("Signed in successfully (ID = " + Gamer.GamerId + ")");

        //Save the User for reconnect later
        SaveGamer(Gamer);

        //Add register field for stop being a guest
        var loginUI = FindObjectOfType <LoginUI>();

        loginUI.updateUI();

        var profile = FindObjectOfType <ProfileScript>();

        //Update profile
        if (profile != null)
        {
            profile.UpdateProfile();
        }
    }
Exemple #2
0
 // Invoked when any sign in operation has completed
 private void DidLogin(Gamer newGamer)
 {
     if (Gamer != null)
     {
         Debug.LogWarning("Current gamer " + Gamer.GamerId + " has been dismissed");
         Loop.Stop();
     }
     Gamer = newGamer;
     Loop  = Gamer.StartEventLoop();
     Loop.ReceivedEvent += Loop_ReceivedEvent;
     Debug.Log("Signed in successfully (ID = " + Gamer.GamerId + ")");
 }
        /// <summary>
        /// Stop the events loop to retrieve server pending events. A stopped events loop shouldn't be started again.
        /// </summary>
        public static void Handling_StopEventsListening()
        {
            // Stop the events loop
            if (eventLoop != null)
            {
                eventLoop.Stop();
                eventLoop = null;

                if (verboseEventLoop)
                {
                    DebugLogs.LogVerbose("[CotcSdkTemplate:EventFeatures] Unregistered from gamer's events loop");
                }
            }
        }