| | |
| | |
|
| | | using Snxxz.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class BagStoreWin : StoreUIBasic
|
| | | {
|
| | |
| | | private Text _sliverText;
|
| | | #endregion
|
| | |
|
| | | StoreModel _storeModel;
|
| | | StoreModel m_storeModel
|
| | | {
|
| | | get { return _storeModel ?? (_storeModel = ModelCenter.Instance.GetModel<StoreModel>()); }
|
| | | }
|
| | | StoreModel m_storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
|
| | |
|
| | | int shopId = 0;
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | {
|
| | | if (AchievementGoto.guideAchievementId != 0)
|
| | | {
|
| | | SuccessConfig successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
|
| | | var successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
|
| | | if (successConfig.Type == 96)
|
| | | {
|
| | | p_shopItemlist = m_storeModel.TryGetStoreDatas(m_storeModel.storeFuncType);
|
| | |
| | |
|
| | | public void InitModel()
|
| | | {
|
| | | CreateShopItemCell(_shopCtrl,2);
|
| | | CreateShopItemCell(_shopCtrl, 2);
|
| | | }
|
| | |
|
| | | protected override void CreateShopItemCell(ScrollerController shopCtrl, int row)
|
| | |
| | | shopItemCell.stateImage.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | ItemConfig chinModel = ItemConfig.Get(m_storeModel.GetReplaceId(shopInfo.ID,shopInfo.ItemID));
|
| | | ItemConfig chinModel = ItemConfig.Get(m_storeModel.GetReplaceId(shopInfo.ID, shopInfo.ItemID));
|
| | | if (chinModel != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(chinModel.ID, true, 0);
|
| | |
| | | shopItemCell.vipText.gameObject.SetActive(true);
|
| | | shopItemCell.vipText.text = Language.Get("StoreWin101", shopInfo.VIPLV[nextVipIndex]);
|
| | | shopItemCell.sellImage.gameObject.SetActive(false);
|
| | | shopItemCell.itemNameText.color = UIHelper.GetUIColor(TextColType.Red,true);
|
| | | shopItemCell.vipText.color = UIHelper.GetUIColor(TextColType.Red,true);
|
| | | shopItemCell.itemNameText.color = UIHelper.GetUIColor(TextColType.Red, true);
|
| | | shopItemCell.vipText.color = UIHelper.GetUIColor(TextColType.Red, true);
|
| | | isShowBuyPrice = false;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | shopItemCell.itemNameText.color = UIHelper.GetUIColor(chinModel.ItemColor, true);
|
| | | shopItemCell.vipText.color = UIHelper.GetUIColor(TextColType.Black,true);
|
| | | shopItemCell.vipText.color = UIHelper.GetUIColor(TextColType.Black, true);
|
| | | }
|
| | |
|
| | | shopItemCell.LoadGuidEffectCtrl(shopInfo.ID,shopId);
|
| | | shopItemCell.LoadGuidEffectCtrl(shopInfo.ID, shopId);
|
| | | }
|
| | |
|
| | | shopItemCell.ShopCellBtn.RemoveAllListeners();
|
| | | shopItemCell.ShopCellBtn.AddListener(() => {
|
| | | shopItemCell.ShopCellBtn.AddListener(() =>
|
| | | {
|
| | | if (shopInfo.ID == shopId)
|
| | | {
|
| | | shopId = 0;
|
| | | shopItemCell.LoadGuidEffectCtrl(shopInfo.ID,shopId);
|
| | | shopItemCell.LoadGuidEffectCtrl(shopInfo.ID, shopId);
|
| | | }
|
| | | m_storeModel.OnClickShopCell(shopInfo);
|
| | | });
|
| | | shopItemCell.buyBtn.RemoveAllListeners();
|
| | | shopItemCell.buyBtn.AddListener(()=> {
|
| | | if(shopInfo.ID == shopId)
|
| | | shopItemCell.buyBtn.AddListener(() =>
|
| | | {
|
| | | if (shopInfo.ID == shopId)
|
| | | {
|
| | | shopId = 0;
|
| | | shopItemCell.LoadGuidEffectCtrl(shopInfo.ID,shopId);
|
| | | shopItemCell.LoadGuidEffectCtrl(shopInfo.ID, shopId);
|
| | | }
|
| | | m_storeModel.SendBuyShopItem(shopInfo,1);
|
| | | m_storeModel.SendBuyShopItem(shopInfo, 1);
|
| | | });
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | public void OnFrenshMoneyInfo()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData != null)
|
| | | {
|
| | | _goldText.text = PlayerDatas.Instance.baseData.diamond.ToString();
|
| | | _goldPaperText.text = PlayerDatas.Instance.baseData.bindDiamond.ToString();
|
| | | _sliverText.text = ItemLogicUtility.Instance.OnChangeCoinsUnit(PlayerDatas.Instance.baseData.allCopper);
|
| | | }
|
| | | else
|