private void ParserCommand(Hashtable has) { IDs _id = (IDs)has["id"].GetHashCode(); #if UNITY_EDITOR Debug.Log(Time.frameCount + " <Color=#fff000> UI::Parser - " + _id.ToString() + " </Color>"); #endif switch (_id) { case IDs.TouchLock: SetTouchLock(true); break; case IDs.TouchUnLock: SetTouchLock(false); break; case IDs.RQCheckDeal: RQCheckDeal(); return; case IDs.RQOutOfCoin: RQOutOfCoin(); return; case IDs.RQGetBuyCoins: RQGetBuyCoins(); return; case IDs.RQCoinsStore: RQCoinsStore(has["tag"].ToString(), has["promotion"].ToString()); return; case IDs.UpdateBuyButton: UpdateCoinsButton(); break; case IDs.PopCoinsStore: SetTouchLock(false); Main.I.AppsFlyerEvent(AFInAppEvents.SHOP, AFInAppEvents.OPEN_SHOP, "CoinsStore"); Coins.ShowShopCoins(true); break; case IDs.PopDailySpinShop: SetTouchLock(false); Main.I.AppsFlyerEvent(AFInAppEvents.SHOP, AFInAppEvents.OPEN_SHOP, "DailySpinShop"); Popup.ShowPopup <UIPopDailySpinShop>("DailySpinShop", (int)_id, null, null); break; case IDs.PopFirstPurchaseOffer: SetTouchLock(false); Main.I.AppsFlyerEvent(AFInAppEvents.SHOP, AFInAppEvents.OPEN_SHOP, "FirstPurchaseOffer"); Popup.ShowPopup <UIPopFirstPurchaseOffer>("FirstPurchaseOffer", (int)_id, null, null); break; case IDs.PopSweetOffer: SetTouchLock(false); Main.I.AppsFlyerEvent(AFInAppEvents.SHOP, AFInAppEvents.OPEN_SHOP, "SweetOffer"); Popup.ShowPopup <UIPopSweetOffer>("SweetOffer", (int)_id, null, null); break; case IDs.PopDailySpin: SetTouchLock(false); Popup.ShowPopup <UIPopDailySpin>("DailySpin", (int)_id, null); break; case IDs.PopGift: if (Facebook.Unity.FB.IsLoggedIn) //로그인상태일때는 친구갱신 후 팝업// { SetTouchLock(true); Main.FB.StartCoroutine(Main.FB.LoadAppFriends(() => { SetTouchLock(false); Gift.Initialize(); Gift.gameObject.SetActive(true); Gift.SetParamsData((int)_id, null, null); })); } else { Gift.Initialize(); Gift.gameObject.SetActive(true); Gift.SetParamsData((int)_id, null, null); } break; case IDs.PopSetting: SetTouchLock(false); Popup.ShowPopup <UIPopSettings>("Settings", (int)_id, null); break; case IDs.PopPurchaseSuccessful: SetTouchLock(false); if (has["first"] != null) { Popup.ShowPopup <UIPopPurchaseSuccessful>("PurchaseSuccessful", (int)_id, null, has["coins"], has["first"]); } else { Popup.ShowPopup <UIPopPurchaseSuccessful>("PurchaseSuccessful", (int)_id, null, has["coins"]); } break; } remove(_id); }
/// <summary> /// This method shows the popup. /// </summary> /// <param name="text">The text of the popup, of type string</param> /// <param name="colour1">The colour of the first text, /// of type Color</param> /// <param name="colour2">The colour of the second text, /// of type Colour</param> public void StartPopup(string text, Color colour1, Color colour2) { // Setting popup text and colours _popupUI.SetText(text, colour1, colour2); _popupUI.ShowPopup(); // Showing the popup }