|
@@ -105,12 +105,17 @@ namespace GFGGame
|
|
|
{
|
|
|
base.OnShown();
|
|
|
Debug.Log("OnShown:LuckyBoxView");
|
|
|
+
|
|
|
+ _valueBarController.OnShown();
|
|
|
+ _valueBarController.Controller(4);
|
|
|
+
|
|
|
LuckyBoxDataManager.Instance.luckyBoxIds.Clear();
|
|
|
LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_2);
|
|
|
LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_3);
|
|
|
_activeBoxId = 0;
|
|
|
_activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(ConstLimitTimeActivityType.ActLimitTsy);
|
|
|
|
|
|
+ //第一个活动可能为轮换活动
|
|
|
if (LuckyBoxDataManager.Instance.RotatingId > 0)
|
|
|
{
|
|
|
RotatingLuckyBoxCfg rotatingLuckyBox = RotatingLuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.RotatingId);
|
|
@@ -122,12 +127,15 @@ namespace GFGGame
|
|
|
int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[1];
|
|
|
if (this.viewData != null)
|
|
|
{
|
|
|
- boxId = (int)this.viewData;
|
|
|
+ if(boxId != LuckyBoxDataManager.BOX_ID_1) //是1的时候,就使用轮换活动,不是1就是传入的固定活动
|
|
|
+ boxId = (int)this.viewData;
|
|
|
}
|
|
|
|
|
|
+ //新手引导选中第一个活动
|
|
|
if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0)
|
|
|
- boxId = LuckyBoxDataManager.BOX_ID_1;
|
|
|
+ boxId = LuckyBoxDataManager.Instance.luckyBoxIds[1];
|
|
|
|
|
|
+ //第二个活动会有许愿活动出现
|
|
|
if (_activityId > 0 && boxId == LuckyBoxDataManager.BOX_ID_2)
|
|
|
GetWishingPoolInfo(_activityId);
|
|
|
|
|
@@ -139,9 +147,6 @@ namespace GFGGame
|
|
|
else if (actLimitTsyOpen && LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_2)
|
|
|
Timers.inst.Add(1, 0, UpdateTime);
|
|
|
|
|
|
- _valueBarController.OnShown();
|
|
|
- _valueBarController.Controller(4);
|
|
|
-
|
|
|
_curIndex = LuckyBoxDataManager.Instance.luckyBoxIds.IndexOf(boxId);
|
|
|
_ui.m_listBg.numItems = LuckyBoxDataManager.Instance.luckyBoxIds.Count;
|
|
|
_ui.m_listBg.ScrollToView(_curIndex);
|