|
@@ -49,9 +49,19 @@ namespace GFGGame
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
_rewardList.AddRange(this.viewData as List<ItemData>);
|
|
_rewardList.AddRange(this.viewData as List<ItemData>);
|
|
- _ui.m_c1.selectedIndex = _rewardList.Count == 1 ? 0 : 1;
|
|
|
|
_effectIndex = 0;
|
|
_effectIndex = 0;
|
|
-
|
|
|
|
|
|
+ if (_rewardList.Count == 1)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_c1.selectedIndex = 0;
|
|
|
|
+ UpdateItem(_ui.m_itemOne.target, 0);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ for (int i = 0; i < _rewardList.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ UpdateItem(_ui.target.GetChild("item" + i).asCom, i);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
protected override void OnHide()
|
|
@@ -86,6 +96,14 @@ namespace GFGGame
|
|
}
|
|
}
|
|
_effectIndex++;
|
|
_effectIndex++;
|
|
}
|
|
}
|
|
|
|
+ int count = 0;
|
|
|
|
+ bool isFirst = false;
|
|
|
|
+ for (int i = 0; i < _rewardList.Count; i++)
|
|
|
|
+ {
|
|
|
|
+ if (_rewardList[i].id == itemData.id) count++;
|
|
|
|
+ if (count == 1 && i == index) isFirst = true;
|
|
|
|
+ }
|
|
|
|
+ item.m_comIcon.m_imgNew.visible = count == ItemDataManager.GetItemNum(itemData.id) && isFirst;
|
|
|
|
|
|
UI_LuckyBoxBonusShowItem.ProxyEnd();
|
|
UI_LuckyBoxBonusShowItem.ProxyEnd();
|
|
}
|
|
}
|