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(); } }
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 = ""; }
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); }
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); } }
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 } }
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); } }
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(""); }
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); } }
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); } }