private void SerialPaySubscribeInfo(string msg) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialPaySubscribeInfo msg" + msg, null, null, null, null, null, XDebugColor.XDebug_None); Dictionary <string, object> dictionary = Json.Deserialize(msg) as Dictionary <string, object>; if (dictionary == null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialPaySubscribeInfo dict == null", null, null, null, null, null, XDebugColor.XDebug_None); return; } IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); object obj; if (dictionary.TryGetValue("data", out obj)) { Dictionary <string, object> dictionary2 = obj as Dictionary <string, object>; object obj2; if (dictionary2 != null && dictionary2.TryGetValue("flag", out obj2) && @interface != null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialPaySubscribeInfo result =" + obj2.ToString(), null, null, null, null, null, XDebugColor.XDebug_None); @interface.OnPayCallback(obj2.ToString()); return; } } if (@interface != null) { @interface.OnPayCallback("Failure"); } }
public void CloseWebView(UniWebView webView) { if (webView == null) { webView = this._webView; } if (webView != null) { webView.Hide(); UnityEngine.Object.Destroy(webView); webView.OnReceivedMessage -= new UniWebView.ReceivedMessageDelegate(this.OnReceivedMessage); webView.OnLoadComplete -= new UniWebView.LoadCompleteDelegate(this.OnLoadComplete); webView.OnWebViewShouldClose -= new UniWebView.WebViewShouldCloseDelegate(this.OnWebViewShouldClose); webView.OnEvalJavaScriptFinished -= new UniWebView.EvalJavaScriptFinishedDelegate(this.OnEvalJavaScriptFinished); webView.InsetsForScreenOreitation -= new UniWebView.InsetsForScreenOreitationDelegate(this.InsetsForScreenOreitation); } this._webView = null; this._is_bgopen = true; if (UniWeb.m_uiUtility == null) { UniWeb.m_uiUtility = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); } UniWeb.m_uiUtility.OnSetBg(true); UniWeb.m_uiUtility.OnWebViewClose(); }
private void SerialHandleReplay(string msg) { IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface != null) { @interface.OnReplayStart(); } }
private void SerialHandleScreenLock(string msg) { IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface != null) { @interface.SerialHandleScreenLock(msg); } }
public void PayCallBack(string msg) { XSingleton <XDebug> .singleton.AddLog("[Pay]CallBack: ", msg, null, null, null, null, XDebugColor.XDebug_None); IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface != null) { @interface.OnPayCallback(msg); } }
private void OnActivityQQShare(Dictionary <string, object> dict) { IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface != null && [email protected]()) { XSingleton <XDebug> .singleton.AddGreenLog("Pandora qqshare not installed", null, null, null, null, null); return; } object sceneObj; if (!dict.TryGetValue("scene", out sceneObj)) { return; } object titleObj; dict.TryGetValue("title", out titleObj); object summaryObj; dict.TryGetValue("summary", out summaryObj); object targetUrlObj; dict.TryGetValue("targetUrl", out targetUrlObj); object obj; dict.TryGetValue("imageUrl", out obj); if (obj != null) { base.StartCoroutine(this.DownloadPic(obj.ToString(), delegate(string filepath) { if (!string.IsNullOrEmpty(filepath)) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["scene"] = ((sceneObj != null) ? sceneObj.ToString() : string.Empty); dictionary["title"] = ((titleObj != null) ? titleObj.ToString() : string.Empty); dictionary["summary"] = ((summaryObj != null) ? summaryObj.ToString() : string.Empty); dictionary["targetUrl"] = ((targetUrlObj != null) ? targetUrlObj.ToString() : string.Empty); dictionary["imageUrl"] = filepath; string text = MiniJSON.Json.Serialize(dictionary); XSingleton <XDebug> .singleton.AddGreenLog("Pandora pandoraShareQQ json = " + text, null, null, null, null, null); XPlatform component = this.gameObject.GetComponent <XPlatform>(); if (component != null) { this.isSharing = true; component.SendGameExData("share_send_to_struct_qq", text); } } })); } }
private void SerialGameCenterLaunch(string msg) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialGameCenterLaunch msg" + msg, null, null, null, null, null, XDebugColor.XDebug_None); Dictionary <string, object> dictionary = Json.Deserialize(msg) as Dictionary <string, object>; if (dictionary == null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialGameCenterLaunch dict == null", null, null, null, null, null, XDebugColor.XDebug_None); return; } IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); object obj; if (dictionary.TryGetValue("data", out obj) && @interface != null) { Dictionary <string, object> dictionary2 = obj as Dictionary <string, object>; object obj2 = null; if (dictionary2 != null && dictionary2.TryGetValue("wakeup_platform", out obj2)) { XSingleton <XDebug> .singleton.AddLog("[SerialGameCenterLaunch] platform: " + obj2.ToString(), null, null, null, null, null, XDebugColor.XDebug_None); if ((long)obj2 == 1L) { XSingleton <XDebug> .singleton.AddLog("[SerialGameCenterLaunch] platform == 1", null, null, null, null, null, XDebugColor.XDebug_None); object obj3 = null; if (dictionary2.TryGetValue("wakeup_wx_extInfo", out obj3) && obj3.ToString() == "WX_GameCenter") { @interface.OnGameCenterWakeUp(3); XSingleton <XDebug> .singleton.AddLog("[SerialGameCenterLaunch] StartUpType.StartUp_WX", null, null, null, null, null, XDebugColor.XDebug_None); return; } } else if ((long)obj2 == 2L) { XSingleton <XDebug> .singleton.AddLog("[SerialGameCenterLaunch] platform == 2", null, null, null, null, null, XDebugColor.XDebug_None); object obj4 = null; if (dictionary2.TryGetValue("wakeup_qq_extInfo", out obj4) && obj4.ToString() == "sq_gamecenter") { @interface.OnGameCenterWakeUp(2); XSingleton <XDebug> .singleton.AddLog("[SerialGameCenterLaunch] StartUpType.StartUp_QQ", null, null, null, null, null, XDebugColor.XDebug_None); } } } } }
public void SerialFriendsInfo(string msg) { this.friendsInfo = XSingleton <PUtil> .singleton.Deserialize <FriendInfo>(msg); IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface == null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialFriendsInfo entrance == null", null, null, null, null, null, XDebugColor.XDebug_None); return; } @interface.OnGetPlatFriendsInfo(); }
public static void LiveStatusChangedDelegate(QGameKit.LiveStatus newState) { if (BroadcastManager.m_uiUtility == null || BroadcastManager.m_uiUtility.Deprecated) { BroadcastManager.m_uiUtility = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); } if (newState == QGameKit.LiveStatus.LiveStarting || newState == QGameKit.LiveStatus.LiveStarted) { BroadcastManager.m_uiUtility.StartBroadcast(true); ApolloManager.sington.Capture(true); } else if (newState == QGameKit.LiveStatus.LiveStopping || newState == QGameKit.LiveStatus.LiveStopped) { BroadcastManager.m_uiUtility.StartBroadcast(false); ApolloManager.sington.Capture(false); } }
private void OnActivityShowItemTip(Dictionary <string, object> dict) { object obj; if (dict.TryGetValue("itemId", out obj)) { int num = 0; if (int.TryParse(obj.ToString(), out num)) { XSingleton <XDebug> .singleton.AddGreenLog("Pandora itemId = " + num, null, null, null, null, null); IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface != null) { @interface.ShowTooltipDialog(num, null); } } } }
private void OnActivityPopClose(Dictionary <string, object> dict) { object obj; if (dict.TryGetValue("content", out obj)) { string text = obj.ToString(); XSingleton <XDebug> .singleton.AddGreenLog("Pandora OnActivityPopClose content = " + text, null, null, null, null, null); for (int i = 0; i < this.listActivityPopInfo.Count; i++) { if (this.listActivityPopInfo[i].activityName == text) { IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface != null) { @interface.ShowPandoraPopView(false); } this.listActivityPopInfo[i].isClose = true; break; } } for (int j = 0; j < this.listActivityPopInfo.Count; j++) { if (this.listActivityPopInfo[j].isReady && !this.listActivityPopInfo[j].isClose) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["type"] = "pop"; dictionary["content"] = this.listActivityPopInfo[j].activityName; string jsonStr = MiniJSON.Json.Serialize(dictionary); Pandora.Instance.DoJson(jsonStr); XSingleton <XDebug> .singleton.AddGreenLog("Pandora OnActivityPopClose open = " + this.listActivityPopInfo[j].activityName, null, null, null, null, null); break; } } } }
public void SerialGuildGroupShare(string msg) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialGuildGroupShare msg" + msg, null, null, null, null, null, XDebugColor.XDebug_None); Dictionary <string, object> dictionary = Json.Deserialize(msg) as Dictionary <string, object>; if (dictionary == null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialGuildGroupShare dict == null", null, null, null, null, null, XDebugColor.XDebug_None); return; } IGuildGroup @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IGuildGroup>(XSingleton <XCommon> .singleton.XHash("IGuildGroup")); if (@interface == null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialGuildGroupShare entrance == null", null, null, null, null, null, XDebugColor.XDebug_None); return; } object obj = null; object obj2 = null; if (dictionary.TryGetValue("apiId", out obj) && dictionary.TryGetValue("data", out obj2)) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialGuildGroupShare apiId & data", null, null, null, null, null, XDebugColor.XDebug_None); @interface.GuildGroupResult(obj.ToString(), obj2.ToString(), 0); } if (obj2 != null) { IUiUtility interface2 = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (interface2 != null) { interface2.NoticeShareResult(obj2.ToString()); } } }
public void InitWebInfo(int platform, string openid, string serverid, string roleid, string nickname) { if (UniWeb.m_uiUtility == null) { UniWeb.m_uiUtility = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); } if (platform == 0) { this.mAppId = "1105309683"; } else { this.mAppId = "wxfdab5af74990787a"; } this.mOpenid = openid; this.mServerid = serverid; this.mRoleid = roleid; this.mNickName = nickname; string sDKConfig = ((I3RDPlatformSDKEX)this._interface).GetSDKConfig("get_login_bill", string.Empty); object obj = Json.Deserialize(sDKConfig); Dictionary <string, object> dictionary = obj as Dictionary <string, object>; if (dictionary != null) { if (dictionary.ContainsKey("token")) { this.mToken = (dictionary["token"] as string); } if (dictionary.ContainsKey("openid")) { this.mOpenid = (dictionary["openid"] as string); } } UnityEngine.Debug.Log("The openid: " + this.mOpenid); UnityEngine.Debug.Log("The token: " + this.mToken); }
private void SerialMarketingInfo(string msg) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo msg" + msg, null, null, null, null, null, XDebugColor.XDebug_None); Dictionary <string, object> dictionary = Json.Deserialize(msg) as Dictionary <string, object>; if (dictionary == null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo dict == null", null, null, null, null, null, XDebugColor.XDebug_None); return; } IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); object obj; if (dictionary.TryGetValue("data", out obj) && @interface != null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo data", null, null, null, null, null, XDebugColor.XDebug_None); Dictionary <string, object> dictionary2 = obj as Dictionary <string, object>; object obj2; if (dictionary2 != null && dictionary2.TryGetValue("flag", out obj2)) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo flag", null, null, null, null, null, XDebugColor.XDebug_None); object obj3; if (obj2.ToString() == "Success" && dictionary2 != null && dictionary2.TryGetValue("mpinfo", out obj3)) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo mpinfo", null, null, null, null, null, XDebugColor.XDebug_None); List <object> list = obj3 as List <object>; if (list != null) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo array != null", null, null, null, null, null, XDebugColor.XDebug_None); List <PayMarketingInfo> list2 = new List <PayMarketingInfo>(); for (int i = 0; i < list.Count; i++) { object obj4 = list[i]; Dictionary <string, object> dictionary3 = obj4 as Dictionary <string, object>; PayMarketingInfo payMarketingInfo = new PayMarketingInfo(); object obj5; if (dictionary3 != null && dictionary3.TryGetValue("num", out obj5)) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo num = " + obj5.ToString(), null, null, null, null, null, XDebugColor.XDebug_None); payMarketingInfo.diamondCount = int.Parse(obj5.ToString()); } object obj6; if (dictionary3 != null && dictionary3.TryGetValue("send_num", out obj6)) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo send_num = " + obj6.ToString(), null, null, null, null, null, XDebugColor.XDebug_None); payMarketingInfo.sendCount = int.Parse(obj6.ToString()); } object obj7; if (dictionary3 != null && dictionary3.TryGetValue("send_ext", out obj7)) { XSingleton <XDebug> .singleton.AddLog("[PDatabase]SerialMarketingInfo send_ext = " + obj7.ToString(), null, null, null, null, null, XDebugColor.XDebug_None); payMarketingInfo.sendExt = obj7.ToString(); } list2.Add(payMarketingInfo); } @interface.OnPayMarketingInfo(list2); } } } } }
private void OnActivityWeChatShare(Dictionary <string, object> dict) { IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface != null && [email protected]()) { XSingleton <XDebug> .singleton.AddGreenLog("Pandora wx not installed", null, null, null, null, null); return; } object sceneObj; if (!dict.TryGetValue("scene", out sceneObj)) { return; } object titleObj; dict.TryGetValue("title", out titleObj); object descObj; dict.TryGetValue("desc", out descObj); object urlObj; dict.TryGetValue("url", out urlObj); object mediaTagNameObj; dict.TryGetValue("mediaTagName", out mediaTagNameObj); object obj; dict.TryGetValue("filePath", out obj); object messageExtObj; dict.TryGetValue("messageExt", out messageExtObj); if (obj != null) { base.StartCoroutine(this.DownloadPic(obj.ToString(), delegate(string filepath) { if (!string.IsNullOrEmpty(filepath)) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["scene"] = ((sceneObj != null) ? sceneObj.ToString() : string.Empty); dictionary["title"] = ((titleObj != null) ? titleObj.ToString() : string.Empty); dictionary["desc"] = ((descObj != null) ? descObj.ToString() : string.Empty); dictionary["url"] = ((urlObj != null) ? urlObj.ToString() : string.Empty); dictionary["mediaTagName"] = ((mediaTagNameObj != null) ? mediaTagNameObj.ToString() : string.Empty); dictionary["filePath"] = filepath; dictionary["messageExt"] = ((messageExtObj != null) ? messageExtObj.ToString() : string.Empty); string text = MiniJSON.Json.Serialize(dictionary); XSingleton <XDebug> .singleton.AddGreenLog("Pandora pandoraShareWX json = " + text, null, null, null, null, null); XPlatform component = this.gameObject.GetComponent <XPlatform>(); if (component != null) { XSingleton <XDebug> .singleton.AddGreenLog("Pandora share_send_to_with_url_wx json = " + text, null, null, null, null, null); this.isSharing = true; component.SendGameExData("share_send_to_with_url_wx", text); } } })); } }
private void _OnJsonPandoraEvent(string json) { Dictionary <string, object> dictionary = com.tencent.pandora.MiniJSON.Json.Deserialize(json) as Dictionary <string, object>; if (dictionary == null) { XSingleton <XDebug> .singleton.AddLog("[PandoraMgr]_OnJsonPandoraEvent dict == null", null, null, null, null, null, XDebugColor.XDebug_None); return; } object obj; if (dictionary.TryGetValue("type", out obj)) { string text = obj.ToString(); string text2 = text; switch (text2) { case "popReady": this.OnActivityPopReady(dictionary); break; case "popStop": this.OnActivityPopStop(dictionary); break; case "popClose": this.OnActivityPopClose(dictionary); break; case "showTab": this.OnActivityShowTab(dictionary); break; case "hideTab": this.OnActivityHideTab(dictionary); break; case "showRedpoint": this.OnActivityShowRedPoint(dictionary); break; case "hideRedpoint": this.OnActivityHideRedPoint(dictionary); break; case "shareWechatLink": this.OnActivityWeChatShare(dictionary); break; case "shareQQLink": this.OnActivityQQShare(dictionary); break; case "showItemTips": this.OnActivityShowItemTip(dictionary); break; } } object obj2; object obj3; if (dictionary.TryGetValue("PanelName", out obj2) && dictionary.TryGetValue("RetCode", out obj3)) { int num2 = 0; if (int.TryParse(obj3.ToString(), out num2) && num2 == 0) { XSingleton <XDebug> .singleton.AddGreenLog("PandoraPanelCreate error = " + num2, null, null, null, null, null); for (int i = 0; i < this.listActivityPopInfo.Count; i++) { if (this.listActivityPopInfo[i].activityName == obj2.ToString()) { IUiUtility @interface = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); if (@interface != null) { @interface.ShowPandoraPopView(true); } break; } } } } }
private void Awake() { this._interface = new JoyYouSDK(); UniWeb.m_uiUtility = XSingleton <XInterfaceMgr> .singleton.GetInterface <IUiUtility>(XSingleton <XCommon> .singleton.XHash("IUiUtility")); }