Exemplo n.º 1
0
    public static void Logout_impl(bool cancelAutoLogin)
    {
        Debug.Log("ThirdPartyPlatform.Logout_impl called " + cancelAutoLogin);

        GameDefines.Setting_IsAutoLogin = !cancelAutoLogin;
        if (GameDefines.OutputVerDefs == OutputVersionDefs.Windows)
        {
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
        {
            U3dNdSender.Logout(cancelAutoLogin);
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfanAndroid)
        {
            U3dGfanSender.Logout(cancelAutoLogin);
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
        {
            NdSDKAgent.Logout(cancelAutoLogin);
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfaniPhone ||
                 GameDefines.OutputVerDefs == OutputVersionDefs.AppStore)
        {
            U3dGfaniOSSender.Logout(cancelAutoLogin);
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.UCAndroid ||
                 GameDefines.OutputVerDefs == OutputVersionDefs.UCiPhone)
        {
            UCSDKAgent.Logout();
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.MiAndroid ||
                 GameDefines.OutputVerDefs == OutputVersionDefs.MiiPhone)
        {
            XiaomiSDKAgent.Logout();
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.PPiPhone)
        {
            // nothing because the account logout will be callback from PPSDK
            //
        }
        else
        {
            Globals.Instance.MGUIManager.ShowSimpleCenterTips(20000019, true);
        }

        TalkingDataGA.Logout();
        Globals.Instance.QuitGame();

        // Reset some variables
        CacheUserUniqId = "";
        UserUniqId      = "";
        SessionId       = "";
        NickName        = "";
    }
Exemplo n.º 2
0
 public static void SwitchAccount()
 {
     if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
     {
         U3dNdSender.SwitchAccount();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfanAndroid)
     {
         U3dGfanSender.SwitchAccount();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfaniPhone)
     {
         U3dGfaniOSSender.Logout(false);
     }
     else
     {
         Globals.Instance.MGUIManager.ShowSimpleCenterTips(20000019, true);
     }
 }