123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- using FairyGUI;
- using UI.CommonGame;
- using System.Collections;
- using System.Collections.Generic;
- namespace GFGGame
- {
- public class GetBonusView : BaseWindow
- {
- // private UI_GetBonusUI _ui;
- // private List<ItemData> _bonusList;
- // protected override void OnInit()
- // {
- // base.OnInit();
- // _ui = UI_GetBonusUI.Create();
- // this.viewCom = _ui.target;
- // this.viewCom.Center();
- // this.modal = true;
- // _ui.m_listBonus.itemRenderer = UpdateBonusItem;
- // _ui.m_listBonus.onClickItem.Add(OnClickListBonusItem);
- // }
- // protected override void OnShown()
- // {
- // base.OnShown();
- // _bonusList = this.viewData as List<ItemData>;
- // if (_bonusList != null)
- // {
- // _ui.m_listBonus.numItems = _bonusList.Count;
- // }
- // else
- // {
- // _ui.m_listBonus.numItems = 0;
- // }
- // if (_ui.m_listBonus.numItems > 4)
- // {
- // _ui.m_listBonus.columnGap = 40;
- // }
- // else
- // {
- // _ui.m_listBonus.columnGap = 60;
- // }
- // int targetY = (int)(this.viewCom.y + _ui.target.y + _ui.target.height);
- // }
- // protected override void OnHide()
- // {
- // base.OnHide();
- // GetSuitItemController.TryShow(0);
- // }
- // private void OnClickListBonusItem(EventContext context)
- // {
- // GComponent item = context.data as GComponent;
- // int itemId = (int)item.data;
- // GoodsItemTipsController.ShowItemTips(itemId);
- // }
- // private void UpdateBonusItem(int index, GObject item)
- // {
- // ItemData itemData = _bonusList[index] as ItemData;
- // ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
- // UI_BonusItem listItem = UI_BonusItem.Proxy(item);
- // listItem.m_goodsItem.m_txtNumber.text = "x" + itemData.num;
- // listItem.m_txtOwned.SetVar("count", "" + ItemDataManager.GetItemNum(itemData.id)).FlushVars();
- // listItem.m_goodsItem.m_txtName.text = itemCfg.name;
- // listItem.m_goodsItem.m_iconItem.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
- // listItem.m_iconBonusOnce.visible = itemData.isOnceBonus;
- // RarityIconController.UpdateRarityIcon(listItem.m_goodsItem.m_iconItem.m_rarity, itemData.id, true);
- // listItem.target.data = itemData.id;
- // }
- // protected override void UpdateToCheckGuide(object param)
- // {
- // if (!ViewManager.CheckIsTopView(this.viewCom)) return;
- // GuideController.TryGuide(null, ConstGuideId.GET_BONUS_FIRST, 1, "恭喜你,获得了第一份奖励,点击图标可以查看物品信息,点击半透明区域继续", -1, true, (int)(this.viewCom.y + _ui.target.y + _ui.target.height));
- // }
- // protected override void TryCompleteGuide()
- // {
- // GuideCfg cfg = GuideCfgArray.Instance.GetCfg(ConstGuideId.GET_BONUS_FIRST);
- // GuideController.TryCompleteGuideIndex(cfg.id, 1);
- // GuideController.TryCompleteGuide(ConstGuideId.GET_BONUS_FIRST, 1);
- // }
- }
- }
|