コード例 #1
0
 public virtual void Logout(AsynchOnFinishedManifold asynchOnFinishedManifold = null)
 {
     if (mixSession == null)
     {
         return;
     }
     Service.Get <ICPSwrveService>().StartTimer("mixsdktimer", "log_out");
     IsLoggingOut = true;
     mixSession.OnAuthenticationLost -= onAuthenticationLost;
     if (asynchOnFinishedManifold != null)
     {
         asynchOnFinishedManifold.AsynchStart();
     }
     mixSession.LogOut(delegate(ISessionLogOutResult result)
     {
         if (result.Success)
         {
             Service.Get <ICPSwrveService>().EndTimer("mixsdktimer", null, "success");
         }
         else
         {
             Service.Get <ICPSwrveService>().EndTimer("mixsdktimer", null, "fail");
             if (!mixSession.IsDisposed)
             {
                 mixSession.Dispose();
             }
         }
         clearSession();
         IsLoggingOut = false;
         eventDispatcher.DispatchEvent(default(SessionEvents.SessionEndedEvent));
         eventDispatcher.DispatchEvent(default(SessionEvents.SessionLogoutEvent));
         TechAnalytics.LogNetworkLatency(Service.Get <INetworkServicesManager>().GameServerLatency, Service.Get <INetworkServicesManager>().WebServiceLatency);
         Service.Get <ICPSwrveService>().Action("game.logout", "success");
         if (asynchOnFinishedManifold != null)
         {
             asynchOnFinishedManifold.AsynchFinished();
         }
     });
 }
コード例 #2
0
    protected override IEnumerator init()
    {
        yield return(base.init());

        TechAnalytics.LogTimer("start_timer", (int)totalDuration.TotalSeconds, "start_to_login");
    }