public override void SetParamsData(int id, delegateClose _eventClose, params object[] args) { base.ActiveTween(false); m_id = id; eventClose = _eventClose; m_args = args; _buyClick = false; if (args != null && args.Length > 0) { _news = System.Convert.ToBoolean(args[0]); } _PurchaseItems = USER.I._PKGetPurchaseItems; // 상품 리스트 세팅 for (int i = 0; i < _PurchaseItems.data.packs.Length; i++) { _textCoins[i].text = _PurchaseItems.data.packs[i].coins.ToString("#,#0"); _textPercentage[i].text = string.Format("{0}%", _PurchaseItems.data.packs[i].free_percentage); _textPrice[i].text = string.Format("${0:f}", _PurchaseItems.data.packs[i].price); } StartCoroutine(coUpdateTime()); }
/// <summary> /// 게스트유저에서 페이스북 유저로 전환되었다.. 기존 데이터 정리 /// </summary> public void ResetReConnect() { SaleType = eSaleType.normal; _PKLogin = null; _PKUserInfo = null; _PKGamesInfo = null; _PKGiftsCount = null; _PKListGifts = null; _PKAppFriends = null; _PKSendGiftChallengeItems = null; _PKInvitChallengeCheck = null; _PKInvitChallengeStatus = null; // coins , deal _PKCheckDeal = null; _PKGetPurchaseItems = null; _PKGetUserPromotionList = null; // collect bounus _PKCollectBonus = null; _PKBonusInfo = null; // pig bank //_PKPurchaseVault = null; //_PKVaultInfo = null; //_PKGetVaultShop = null; // News _PKNews = null; oldUserLevel = 0; }
public void click_CodeApply() { if (_inputPromotion.text == "SELECT A COUPON") { return; } //"get_purchase_items" //"get_user_promotion_list" _LViewPromotion.gameObject.SetActive(false); NET.I.SendReqGetPurchaseItems((id, msg) => { PK.GetPurchaseItems.RECEIVE pk = JsonConvert.DeserializeObject <PK.GetPurchaseItems.RECEIVE>(msg); if (pk.data.packs != null) { USER.I._PKGetPurchaseItems = JsonConvert.DeserializeObject <PK.GetPurchaseItems.RECEIVE>(msg); ((LViewCoins)_LViewCoins).UpdatePromotion(); } else { _LViewCoins.Initialize(); _inputPromotion.text = "SELECT A COUPON"; UI.I.ShowMsgBox("Invalid code!"); } }, NET.I.OnSendReqTimerout, "promotion", _inputPromotion.text); }
/// 쿠폰코드 입력 이벤트 /// </summary> public void Input_Promotion() { #if LOCAL_DEBUG if (Main.I.CheatKey(_inputPromotion.text.ToLower())) { _inputPromotion.text = ""; return; } #endif if (_btnCodeCancel.gameObject.activeSelf) { return; } _LViewPromotion.gameObject.SetActive(false); NET.I.SendReqGetPurchaseItems((id, msg) => { PK.GetPurchaseItems.RECEIVE pk = JsonConvert.DeserializeObject <PK.GetPurchaseItems.RECEIVE>(msg); if (pk.data.packs != null) { USER.I._PKGetPurchaseItems = JsonConvert.DeserializeObject <PK.GetPurchaseItems.RECEIVE>(msg); _LViewCoins.Initialize(); } }, NET.I.OnSendReqTimerout, "promotion", _inputPromotion.text); }
public override void SetParamsData(int id, delegateClose _eventClose, params object[] args) { base.ActiveTween(false); m_id = id; eventClose = _eventClose; m_args = args; if (args != null && args.Length > 0) { _news = System.Convert.ToBoolean(args[0]); } _PurchaseItems = USER.I._PKGetPurchaseItems; // 상품 리스트 세팅 for (int i = 0; i < _PurchaseItems.data.packs.Length; i++) { _textCoins[i].text = _PurchaseItems.data.packs[i].coins.ToString("#,#0"); _textPercentage[i].text = string.Format("{0}%", _PurchaseItems.data.packs[i].free_percentage); _textPrice[i].text = string.Format("${0:f}", _PurchaseItems.data.packs[i].price); } if (USER.I.SaleType == eSaleType.normal) { _imgSaleMsg.gameObject.SetActive(false); } else { _imgSaleMsg.gameObject.SetActive(true); } }
/// <summary> /// 프로모션 쿠폰 리스트에서 쿠폰 선택 이벤트 /// </summary> /// <param name="msg">The MSG.</param> public void callback_SelectPromotionCode(string code) { _LViewPromotion.gameObject.SetActive(false); _inputPromotion.text = code; NET.I.SendReqGetPurchaseItems((id, msg) => { PK.GetPurchaseItems.RECEIVE pk = JsonConvert.DeserializeObject <PK.GetPurchaseItems.RECEIVE>(msg); if (pk.data.packs != null) { USER.I._PKGetPurchaseItems = JsonConvert.DeserializeObject <PK.GetPurchaseItems.RECEIVE>(msg); ((LViewCoins)_LViewCoins).UpdatePromotion(); _btnCodeApply.gameObject.SetActive(false); _btnCodeCancel.gameObject.SetActive(true); _imgCodeLock.gameObject.SetActive(true); } }, NET.I.OnSendReqTimerout, "promotion", _inputPromotion.text); }