Beispiel #1
0
 public static void Login(bool supportGuest)
 {
     if (GameDefines.OutputVerDefs == OutputVersionDefs.Windows ||
         GameDefines.OutputVerDefs == OutputVersionDefs.AppStore)
     {
         Globals.Instance.MGUIManager.CreateWindow <GUIPreLogin>(delegate(GUIPreLogin gui)
         {
             Debug.Log("GUIPreLogin::UpdateGUI");
             gui.UpdateGUI();
         });
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
     {
         if (isNdCheckintVer)
         {
             // Please wait
         }
         else
         {
             U3dNdSender.Login(true);
         }
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
     {
         if (isNdCheckintVer)
         {
             // Please wait
         }
         else
         {
             NdSDKAgent.Login();
         }
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfanAndroid)
     {
         U3dGfanSender.Login(true);
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfaniPhone)
     {
         U3dGfaniOSSender.Login(true);
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.UCAndroid ||
              GameDefines.OutputVerDefs == OutputVersionDefs.UCiPhone)
     {
         UCSDKAgent.Login();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.MiAndroid ||
              GameDefines.OutputVerDefs == OutputVersionDefs.MiiPhone)
     {
         XiaomiSDKAgent.Login();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.PPiPhone)
     {
         PPSDKAgent.Login();
     }
 }
Beispiel #2
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        = "";
    }
Beispiel #3
0
    public static bool IsGuestLogined()
    {
        if (GameDefines.OutputVerDefs == OutputVersionDefs.Windows)
        {
            return(GameDefines.Setting_IsGuest);
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
        {
            return(U3dNdSender.IsGuestLogined());
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
        {
            return(NdSDKAgent.IsGuestLogined());
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfanAndroid)
        {
            return(U3dGfanSender.IsGuestLogined());
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfaniPhone)
        {
            return(U3dGfaniOSSender.IsGuestAccount);
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.MiAndroid ||
                 GameDefines.OutputVerDefs == OutputVersionDefs.MiiPhone)
        {
            return(XiaomiSDKAgent.IsGuestLogined());
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.UCAndroid ||
                 GameDefines.OutputVerDefs == OutputVersionDefs.UCiPhone)
        {
            // the UC don't has guest account
            return(false);
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.PPiPhone ||
                 GameDefines.OutputVerDefs == OutputVersionDefs.PPAndroid)
        {
            // the PP don't has guest account
            return(false);
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.None)
        {
            return(GameDefines.Setting_IsGuest);
        }
        else
        {
            return(!string.IsNullOrEmpty(UserUniqId));
        }

        return(false);
    }
Beispiel #4
0
 public static void EnterTradeRecord()
 {
     if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
     {
         U3dNdSender.EnterTradeRecord();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
     {
         NdSDKAgent.EnderUserSettings();
     }
     else
     {
         Globals.Instance.MGUIManager.ShowSimpleCenterTips(20000019, true);
     }
 }
Beispiel #5
0
 public static void NdCheckAppVersion()
 {
     if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
     {
         isNdCheckintVer = true;
         U3dNdSender.CheckAppVersion();
     }
     if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
     {
         isNdCheckintVer = true;
         NdSDKAgent.AppVersionUpdate();
     }
     else
     {
         // Gfan and Windows's version check run in our login server
     }
 }
Beispiel #6
0
 public static void Register()
 {
     if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
     {
         U3dNdSender.Register();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
     {
         NdSDKAgent.GuestRegister();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfanAndroid)
     {
         U3dGfanSender.Register();
     }
     else
     {
         Globals.Instance.MGUIManager.ShowSimpleCenterTips(20000019, true);
     }
 }
Beispiel #7
0
    public static string GetUserUniId()
    {
        if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
        {
            return(U3dNdSender.GetUserUniqId());
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
        {
            return(NdSDKAgent.GetUserUniqId());
        }
        else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfanAndroid)
        {
            return(U3dGfanSender.GetUserUniqId());
        }
        else
        {
            return(UserUniqId);
        }

        return("");
    }
Beispiel #8
0
 public static void EnterGameCenter()
 {
     if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
     {
         U3dNdSender.EnterNdPlatform();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
     {
         NdSDKAgent.EnterNdPlatform();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.UCAndroid ||
              GameDefines.OutputVerDefs == OutputVersionDefs.UCiPhone)
     {
         UCSDKAgent.EnterUserCenter();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.PPiPhone)
     {
         PPSDKAgent.EnterPPCenter();
     }
     else
     {
         Globals.Instance.MGUIManager.ShowSimpleCenterTips(20000019, true);
     }
 }
Beispiel #9
0
 public static void Guest2Official()
 {
     if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91iPhone)
     {
         U3dNdSender.Guest2Official();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.Nd91Android)
     {
         NdSDKAgent.GuestRegister();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfanAndroid)
     {
         // Only guest use
         U3dGfanSender.ModifyUserInfo();
     }
     else if (GameDefines.OutputVerDefs == OutputVersionDefs.GfaniPhone)
     {
         U3dGfaniOSSender.Guest2Official();
     }
     else
     {
         Globals.Instance.MGUIManager.ShowSimpleCenterTips(20000019, true);
     }
 }