123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System.Collections.Generic;
- using ET;
- using FairyGUI;
- using UI.LuckyBox;
- using UnityEngine;
- namespace GFGGame
- {
- public class LuckyBoxWishView : BaseWindow
- {
- private UI_LuckyBoxWishUI _ui;
- private int _actLimitTsy = 0;
- public override void Dispose()
- {
- if (_ui != null)
- {
- _ui.Dispose();
- _ui = null;
- }
- base.Dispose();
- }
- protected override void OnInit()
- {
- base.OnInit();
- packageName = UI_LuckyBoxWishUI.PACKAGE_NAME;
- _ui = UI_LuckyBoxWishUI.Create();
- this.viewCom = _ui.target;
- this.viewCom.Center();
- this.modal = true;
- _ui.m_btnWish1.data = 0;
- _ui.m_btnWish1.onClick.Add(OnClickBtnWish);
- _ui.m_btnWish2.data = 1;
- _ui.m_btnWish2.onClick.Add(OnClickBtnWish);
- }
- protected override void AddEventListener()
- {
- base.AddEventListener();
- }
- protected override void OnShown()
- {
- base.OnShown();
- _actLimitTsy = (int)this.viewData;
- }
-
- protected override void OnHide()
- {
- base.OnHide();
- }
- protected override void RemoveEventListener()
- {
- base.RemoveEventListener();
- }
- private void OnClickBtnWish(EventContext context)
- {
- int index = (int)(context.sender as GObject).data;
- ReqAddWishingPoolInfo(index);
- this.Hide();
- }
- private async void ReqAddWishingPoolInfo(int index)
- {
- int activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(_actLimitTsy);
- ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(activityId);
- bool result = await LuckyBoxSProxy.ReqAddWishingPoolInfo(activityOpenCfg.params2Arr[index], activityId);
- if (result)
- {
-
- }
- }
- }
- }
|