|
@@ -50,7 +50,6 @@ namespace GFGGame
|
|
|
InitAllItem();
|
|
|
_ui.m_loaBg.onClick.Add(OnClickBg);
|
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("bj_ckzxin");
|
|
|
- _ui.m_loaOpen.onClick.Add(OnClickOpen);
|
|
|
_ui.m_btnPass.onClick.Add(OnBtnPassClick);
|
|
|
|
|
|
}
|
|
@@ -61,25 +60,19 @@ namespace GFGGame
|
|
|
|
|
|
itemList = (viewData as object[])[0] as List<ItemData>;
|
|
|
itemListAni = new List<ItemData>(itemList.ToArray());
|
|
|
- _ui.m_loaOpen.visible = true;
|
|
|
_ui.m_loaMask.visible = true;
|
|
|
- if (itemList != null)
|
|
|
+
|
|
|
+ int count = itemList.Count;
|
|
|
+ if (count == 10)
|
|
|
{
|
|
|
- int count = itemList.Count;
|
|
|
- if (count == 10)
|
|
|
- {
|
|
|
- _ui.m_c1.selectedIndex = 1;
|
|
|
- }
|
|
|
- else if (count > 0)
|
|
|
- {
|
|
|
- _ui.m_c1.selectedIndex = 0;
|
|
|
- }
|
|
|
- ShowBonusList();
|
|
|
+ _ui.m_c1.selectedIndex = 1;
|
|
|
}
|
|
|
- else
|
|
|
+ else if (count > 0)
|
|
|
{
|
|
|
- _ui.m_loaOpen.visible = false;
|
|
|
+ _ui.m_c1.selectedIndex = 0;
|
|
|
}
|
|
|
+ ShowBonusList();
|
|
|
+
|
|
|
_ui.m_t0.Play(UpdateView);
|
|
|
}
|
|
|
|
|
@@ -123,10 +116,17 @@ namespace GFGGame
|
|
|
}
|
|
|
private void OnClickBg()
|
|
|
{
|
|
|
- this.Hide();
|
|
|
- ViewManager.Show(ViewName.LUCKY_BOX_VIEW, ViewManager.GetGoBackDatas(ViewName.LUCKY_BOX_STAR_VIEW));
|
|
|
- GetSuitItemController.TryShow(0);
|
|
|
- _ui.m_t0.Stop(true, false);
|
|
|
+ if (openCount < itemList.Count)
|
|
|
+ {
|
|
|
+ OnClickOpen();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ this.Hide();
|
|
|
+ ViewManager.Show(ViewName.LUCKY_BOX_VIEW, ViewManager.GetGoBackDatas(ViewName.LUCKY_BOX_STAR_VIEW));
|
|
|
+ GetSuitItemController.TryShow(0);
|
|
|
+ _ui.m_t0.Stop(true, false);
|
|
|
+ }
|
|
|
}
|
|
|
private void UpdateView()
|
|
|
{
|
|
@@ -262,10 +262,7 @@ namespace GFGGame
|
|
|
openCount++;
|
|
|
openState[index] = true;
|
|
|
_ui.m_loaMask.visible = false;
|
|
|
- if (openCount == itemList.Count)
|
|
|
- {
|
|
|
- _ui.m_loaOpen.visible = false;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
private void OnClickItemTips(EventContext context)
|
|
|
{
|
|
@@ -303,6 +300,7 @@ namespace GFGGame
|
|
|
yield return UpdateTime(i);
|
|
|
}
|
|
|
}
|
|
|
+ _ui.m_loaMask.visible = false;
|
|
|
}
|
|
|
private IEnumerator UpdateTime(int index)
|
|
|
{
|
|
@@ -340,9 +338,6 @@ namespace GFGGame
|
|
|
}
|
|
|
private void PlayComplete()
|
|
|
{
|
|
|
- _ui.m_loaMask.visible = false;
|
|
|
- _ui.m_loaOpen.visible = false;
|
|
|
-
|
|
|
if (newCardList.Count > 0)
|
|
|
{
|
|
|
ViewManager.Show<LuckyBoxNewCardView>(new object[] { newCardList, newItemList });
|