|
@@ -164,6 +164,18 @@ namespace GFGGame
|
|
|
UpdateItem(_ui.target.GetChild("item" + i).asCom, i, 10);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //修改,因为加了抽奖动画,在进入后就直接筛选掉所有不是新的
|
|
|
+ for (int i = 0; i < _rewardList.Count; i++)
|
|
|
+ {
|
|
|
+ UI_LuckyBoxBonusShowItem item = UI_LuckyBoxBonusShowItem.Proxy(_itemObjList[i]);
|
|
|
+ if (!item.m_comIcon.m_imgNew.visible)
|
|
|
+ {
|
|
|
+ _recordTurnIndex.Add(i);
|
|
|
+ _recordOpenIndex.Add(i);
|
|
|
+ }
|
|
|
+ UI_LuckyBoxBonusShowItem.ProxyEnd();
|
|
|
+ }
|
|
|
Timers.inst.Add(0.5f, 1, UpDataTimeTouchLoaBg);
|
|
|
}
|
|
|
|
|
@@ -274,7 +286,7 @@ namespace GFGGame
|
|
|
item.m_t0.Play();
|
|
|
if (item.target.data == null)
|
|
|
{
|
|
|
- //item.target.onClick.Add(ShowItemTips);
|
|
|
+ item.target.onClick.Add(ShowItemTips);
|
|
|
}
|
|
|
item.target.data = index;
|
|
|
|
|
@@ -296,7 +308,8 @@ namespace GFGGame
|
|
|
GObject obj = context.sender as GObject;
|
|
|
int index = (int)obj.data;
|
|
|
_chooseIndex = index;
|
|
|
- HandClickItem(index);
|
|
|
+ GoodsItemTipsController.ShowItemTips(_itemIdList[index]);
|
|
|
+ //HandClickItem(index);
|
|
|
}
|
|
|
|
|
|
private void HandClickItem(int index)
|
|
@@ -327,7 +340,9 @@ namespace GFGGame
|
|
|
_ui.m_BtnPass.visible = false;
|
|
|
|
|
|
if (!_recordOpenIndex.Contains(index))
|
|
|
+ {
|
|
|
TurnItem(index);
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
if (!_recordTurnIndex.Contains(index))
|
|
@@ -350,24 +365,23 @@ namespace GFGGame
|
|
|
}
|
|
|
_touchLoaBg = false;
|
|
|
Timers.inst.Add(0.5f, 1, UpDataTimeTouchLoaBg);
|
|
|
-
|
|
|
if (_recordOpenIndex.Count >= _rewardList.Count)
|
|
|
{
|
|
|
_chooseIndex = -1;
|
|
|
this.Hide();
|
|
|
}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // for (int index = 0; index < _rewardList.Count; index++)
|
|
|
- // {
|
|
|
- // if (!_recordOpenIndex.Contains(index))
|
|
|
- // {
|
|
|
- // _chooseIndex = index;
|
|
|
- // HandClickItem(index);
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- //}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ for (int index = 0; index < _rewardList.Count; index++)
|
|
|
+ {
|
|
|
+ if (!_recordOpenIndex.Contains(index))
|
|
|
+ {
|
|
|
+ _chooseIndex = index;
|
|
|
+ HandClickItem(index);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnPass()
|
|
@@ -547,7 +561,13 @@ namespace GFGGame
|
|
|
|
|
|
UI_LuckyBoxBonusShowItem item = UI_LuckyBoxBonusShowItem.Proxy(_itemObjList[index]);
|
|
|
if (!item.m_comIcon.m_imgNew.visible)
|
|
|
- _recordTurnIndex.Add(index);
|
|
|
+ {
|
|
|
+ if(!_recordTurnIndex.Contains(index))
|
|
|
+ {
|
|
|
+ _recordTurnIndex.Add(index);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//先翻开牌面
|
|
|
//item.m_comIcon.m_FlipOpenType.selectedIndex = 0;
|
|
@@ -557,8 +577,15 @@ namespace GFGGame
|
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemIdList[index]);
|
|
|
|
|
|
// 点击特效
|
|
|
- _effectUIDic.Add("CK_Cirle_DJ" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_click_eff, "ui_LuckyBox", "CK_Cirle_DJ"));
|
|
|
- // 翻开特效
|
|
|
+ if (!_effectUIDic.ContainsKey("CK_Cirle_DJ" + index))
|
|
|
+ {
|
|
|
+ _effectUIDic.Add("CK_Cirle_DJ" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_click_eff, "ui_LuckyBox", "CK_Cirle_DJ"));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _effectUIDic["CK_Cirle_DJ" + index] = EffectUIPool.CreateEffectUI(item.m_comIcon.m_click_eff, "ui_LuckyBox", "CK_Cirle_DJ");
|
|
|
+ }
|
|
|
+ // 翻开特效
|
|
|
switch (itemCfg.rarity)
|
|
|
{
|
|
|
case 1:
|
|
@@ -585,7 +612,10 @@ namespace GFGGame
|
|
|
|
|
|
|
|
|
//item.m_comIcon.m_t0.Play();
|
|
|
- _recordOpenIndex.Add(index);
|
|
|
+ if(!_recordOpenIndex.Contains(index))
|
|
|
+ {
|
|
|
+ _recordOpenIndex.Add(index);
|
|
|
+ }
|
|
|
UI_LuckyBoxBonusShowItem.ProxyEnd();
|
|
|
}
|
|
|
}
|