|
@@ -96,7 +96,7 @@ namespace GFGGame
|
|
|
EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, OnListBgScroll);
|
|
|
EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, OnListBgScroll);
|
|
|
}
|
|
|
- protected override void OnShown()
|
|
|
+ protected override async void OnShown()
|
|
|
{
|
|
|
base.OnShown();
|
|
|
|
|
@@ -116,7 +116,9 @@ namespace GFGGame
|
|
|
if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0) boxId = LuckyBoxDataManager.BOX_ID_2;
|
|
|
LuckyBoxDataManager.Instance.currentBoxId = boxId;
|
|
|
|
|
|
- isActiveBoxOpen = Array.IndexOf(LuckyBoxDataManager.Instance.luckyBoxIds, LuckyBoxDataManager.BOX_ID_1) >= 0;
|
|
|
+ int result = await LuckyBoxSProxy.ReqGetLuckyBoxRotatingInfo();
|
|
|
+
|
|
|
+ isActiveBoxOpen = result > 0;
|
|
|
if (isActiveBoxOpen)
|
|
|
{
|
|
|
Timers.inst.Add(1, 0, CheckTime);
|
|
@@ -216,12 +218,6 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // private void UpdateTime(object param)
|
|
|
- // {
|
|
|
- // GTextField txtTime = _ui.m_listBg.GetChildAt(0).asCom.GetChild("txtTime").asTextField;
|
|
|
- // txtTime.text = TimeUtil.FormattingTime(LuckyBoxDataManager.Instance.startTime, LuckyBoxDataManager.Instance.startTime);
|
|
|
- // }
|
|
|
-
|
|
|
private void UpdateBg(object param)
|
|
|
{
|
|
|
string[] resArr = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.currentBoxId).resArr;
|
|
@@ -262,14 +258,6 @@ namespace GFGGame
|
|
|
_ui.m_btnLeft.grayed = _curIndex <= 0;
|
|
|
_ui.m_btnRight.grayed = _curIndex >= _ui.m_listBg.numItems - 1;
|
|
|
|
|
|
- // if (LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1)
|
|
|
- // {
|
|
|
- // Timers.inst.Add(1, 0, CheckTime);
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // Timers.inst.Remove(CheckTime);
|
|
|
- // }
|
|
|
}
|
|
|
|
|
|
private void CheckTime(object param = null)
|