|
@@ -11,17 +11,17 @@ namespace GFGGame
|
|
private UI_LuckBoxBonusShowUI _ui;
|
|
private UI_LuckBoxBonusShowUI _ui;
|
|
private List<ItemData> _rewardList = new List<ItemData>();
|
|
private List<ItemData> _rewardList = new List<ItemData>();
|
|
private List<ItemData> _rewardItemList = new List<ItemData>();
|
|
private List<ItemData> _rewardItemList = new List<ItemData>();
|
|
- private Dictionary<int , Dictionary<int, EffectUI>> _effListTen = new Dictionary<int, Dictionary<int, EffectUI>>();
|
|
|
|
|
|
+ private Dictionary<int, Dictionary<int, EffectUI>> _effListTen = new Dictionary<int, Dictionary<int, EffectUI>>();
|
|
private Dictionary<int, EffectUI> _effList = new Dictionary<int, EffectUI>();
|
|
private Dictionary<int, EffectUI> _effList = new Dictionary<int, EffectUI>();
|
|
|
|
|
|
private Dictionary<int, int> _itemIdList = new Dictionary<int, int>();
|
|
private Dictionary<int, int> _itemIdList = new Dictionary<int, int>();
|
|
private Dictionary<int, GComponent> _itemObjList = new Dictionary<int, GComponent>();
|
|
private Dictionary<int, GComponent> _itemObjList = new Dictionary<int, GComponent>();
|
|
- private List<int> _recordOpenIndex = new List<int>(); //记录打开过得item位置
|
|
|
|
- private List<int> _recordTurnIndex = new List<int>(); //记录播放过item位置
|
|
|
|
- private int _chooseIndex = -1; //当前选中的index
|
|
|
|
- private int _countShow = 0; //第几次展示
|
|
|
|
- private int _countNewRecord = 0; //展示步骤
|
|
|
|
- private bool _handClick = false; //手动点击开启
|
|
|
|
|
|
+ private List<int> _recordOpenIndex = new List<int>(); //璁板綍鎵撳紑杩囧緱item浣嶇疆
|
|
|
|
+ private List<int> _recordTurnIndex = new List<int>(); //璁板綍鎾�斁杩噄tem浣嶇疆
|
|
|
|
+ private int _chooseIndex = -1; //褰撳墠閫変腑鐨刬ndex
|
|
|
|
+ private int _countShow = 0; //绗�嚑娆″睍绀�
|
|
|
|
+ private int _countNewRecord = 0; //灞曠ず姝ラ�
|
|
|
|
+ private bool _handClick = false; //鎵嬪姩鐐瑰嚮寮€鍚�
|
|
|
|
|
|
private EffectUI _effectUI1;
|
|
private EffectUI _effectUI1;
|
|
private EffectUI _effectUI2;
|
|
private EffectUI _effectUI2;
|
|
@@ -37,7 +37,8 @@ namespace GFGGame
|
|
EffectUIPool.Recycle(_effectUI3);
|
|
EffectUIPool.Recycle(_effectUI3);
|
|
_effectUI3 = null;
|
|
_effectUI3 = null;
|
|
|
|
|
|
- for (int key = 0; key < _effListTen.Count; key++) {
|
|
|
|
|
|
+ for (int key = 0; key < _effListTen.Count; key++)
|
|
|
|
+ {
|
|
if (_effListTen.ContainsKey(key))
|
|
if (_effListTen.ContainsKey(key))
|
|
{
|
|
{
|
|
for (int key1 = 0; key1 < _effListTen[key].Count; key1++)
|
|
for (int key1 = 0; key1 < _effListTen[key].Count; key1++)
|
|
@@ -82,7 +83,7 @@ namespace GFGGame
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zx_bg");
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zx_bg");
|
|
|
|
|
|
_ui.m_BtnPass.onClick.Add(OnClickBtnPass);
|
|
_ui.m_BtnPass.onClick.Add(OnClickBtnPass);
|
|
-
|
|
|
|
|
|
+
|
|
UpdateEffect();
|
|
UpdateEffect();
|
|
}
|
|
}
|
|
private void UpdateEffect()
|
|
private void UpdateEffect()
|
|
@@ -108,7 +109,8 @@ namespace GFGGame
|
|
{
|
|
{
|
|
if (_chooseIndex != -1 && GetSuitItemController.GetSuitWaitingToId(_itemIdList[_chooseIndex]))
|
|
if (_chooseIndex != -1 && GetSuitItemController.GetSuitWaitingToId(_itemIdList[_chooseIndex]))
|
|
ClickItem(_chooseIndex);
|
|
ClickItem(_chooseIndex);
|
|
- else {
|
|
|
|
|
|
+ else
|
|
|
|
+ {
|
|
if (_handClick)
|
|
if (_handClick)
|
|
{
|
|
{
|
|
_handClick = false;
|
|
_handClick = false;
|
|
@@ -169,10 +171,11 @@ namespace GFGGame
|
|
item.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
|
|
item.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
|
|
item.m_comIcon.m_FlipOpenType.selectedIndex = 1;
|
|
item.m_comIcon.m_FlipOpenType.selectedIndex = 1;
|
|
item.m_comIcon.m_t1.Play();
|
|
item.m_comIcon.m_t1.Play();
|
|
|
|
+
|
|
switch (itemCfg.rarity)
|
|
switch (itemCfg.rarity)
|
|
{
|
|
{
|
|
case 1:
|
|
case 1:
|
|
-
|
|
|
|
|
|
+
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
|
|
|
|
@@ -184,8 +187,8 @@ namespace GFGGame
|
|
_effectUIDic.Add("CK_Loop_Wait_Jin" + index, EffectUIPool.CreateEffectUI(item.m_waitClick_eff, "ui_LuckyBox", "CK_Loop_Wait_Jin"));
|
|
_effectUIDic.Add("CK_Loop_Wait_Jin" + index, EffectUIPool.CreateEffectUI(item.m_waitClick_eff, "ui_LuckyBox", "CK_Loop_Wait_Jin"));
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
|
|
- //带特效的处理先注释
|
|
|
|
|
|
+
|
|
|
|
+ //甯︾壒鏁堢殑澶勭悊鍏堟敞閲�
|
|
//item.m_comIcon.m_holder.visible = false;
|
|
//item.m_comIcon.m_holder.visible = false;
|
|
//item.m_comIcon.m_holder1.visible = false;
|
|
//item.m_comIcon.m_holder1.visible = false;
|
|
//if (itemCfg.rarity > 2) {
|
|
//if (itemCfg.rarity > 2) {
|
|
@@ -240,7 +243,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
item.target.data = index;
|
|
item.target.data = index;
|
|
|
|
|
|
- _itemIdList.Add(index,itemCfg.id);
|
|
|
|
|
|
+ _itemIdList.Add(index, itemCfg.id);
|
|
_itemObjList.Add(index, com);
|
|
_itemObjList.Add(index, com);
|
|
|
|
|
|
UI_LuckyBoxBonusShowItem.ProxyEnd();
|
|
UI_LuckyBoxBonusShowItem.ProxyEnd();
|
|
@@ -259,7 +262,7 @@ namespace GFGGame
|
|
_ui.m_touchFlipOpen.touchable = true;
|
|
_ui.m_touchFlipOpen.touchable = true;
|
|
_handClick = true;
|
|
_handClick = true;
|
|
ClickItem(index);
|
|
ClickItem(index);
|
|
- Timers.inst.Add(1f, 1, UpClickDataTime,index);
|
|
|
|
|
|
+ Timers.inst.Add(1f, 1, UpClickDataTime, index);
|
|
}
|
|
}
|
|
|
|
|
|
private void UpClickDataTime(object param = null)
|
|
private void UpClickDataTime(object param = null)
|
|
@@ -281,10 +284,9 @@ namespace GFGGame
|
|
_ui.m_BtnPass.visible = false;
|
|
_ui.m_BtnPass.visible = false;
|
|
|
|
|
|
if (!_recordOpenIndex.Contains(index))
|
|
if (!_recordOpenIndex.Contains(index))
|
|
- {
|
|
|
|
TurnItem(index);
|
|
TurnItem(index);
|
|
- }
|
|
|
|
- else {
|
|
|
|
|
|
+ else
|
|
|
|
+ {
|
|
if (!_recordTurnIndex.Contains(index))
|
|
if (!_recordTurnIndex.Contains(index))
|
|
ShowTurnItem(index);
|
|
ShowTurnItem(index);
|
|
else
|
|
else
|
|
@@ -299,7 +301,8 @@ namespace GFGGame
|
|
_chooseIndex = -1;
|
|
_chooseIndex = -1;
|
|
this.Hide();
|
|
this.Hide();
|
|
}
|
|
}
|
|
- else {
|
|
|
|
|
|
+ else
|
|
|
|
+ {
|
|
for (int index = 0; index < _rewardList.Count; index++)
|
|
for (int index = 0; index < _rewardList.Count; index++)
|
|
{
|
|
{
|
|
if (!_recordOpenIndex.Contains(index))
|
|
if (!_recordOpenIndex.Contains(index))
|
|
@@ -353,7 +356,8 @@ namespace GFGGame
|
|
_ui.m_touchFlipOpen.touchable = true;
|
|
_ui.m_touchFlipOpen.touchable = true;
|
|
for (int i = 0; i < _rewardList.Count; i++)
|
|
for (int i = 0; i < _rewardList.Count; i++)
|
|
{
|
|
{
|
|
- if (!_recordTurnIndex.Contains(i)) {
|
|
|
|
|
|
+ if (!_recordTurnIndex.Contains(i))
|
|
|
|
+ {
|
|
ShowTurnItem(i);
|
|
ShowTurnItem(i);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -373,7 +377,7 @@ namespace GFGGame
|
|
|
|
|
|
if (item.m_comIcon.m_imgNew.visible)
|
|
if (item.m_comIcon.m_imgNew.visible)
|
|
{
|
|
{
|
|
- //判断是否有套装需要展示
|
|
|
|
|
|
+ //鍒ゆ柇鏄�惁鏈夊�瑁呴渶瑕佸睍绀�
|
|
if (GetSuitItemController.GetSuitWaitingToId(_itemIdList[index]))
|
|
if (GetSuitItemController.GetSuitWaitingToId(_itemIdList[index]))
|
|
{
|
|
{
|
|
if (_countShow < 1)
|
|
if (_countShow < 1)
|
|
@@ -410,19 +414,20 @@ namespace GFGGame
|
|
_ui.m_touchFlipOpen.touchable = false;
|
|
_ui.m_touchFlipOpen.touchable = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- else {
|
|
|
|
|
|
+ else
|
|
|
|
+ {
|
|
_recordTurnIndex.Add(index);
|
|
_recordTurnIndex.Add(index);
|
|
_ui.m_touchFlipOpen.touchable = false;
|
|
_ui.m_touchFlipOpen.touchable = false;
|
|
}
|
|
}
|
|
UI_LuckyBoxBonusShowItem.ProxyEnd();
|
|
UI_LuckyBoxBonusShowItem.ProxyEnd();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
private void TurnItem(int index)
|
|
private void TurnItem(int index)
|
|
{
|
|
{
|
|
if (!_recordOpenIndex.Contains(index))
|
|
if (!_recordOpenIndex.Contains(index))
|
|
{
|
|
{
|
|
- // 删除 “等待翻开” 的特效
|
|
|
|
- if(_effectUIDic.ContainsKey("CK_Loop_Wait_Chen" + index))
|
|
|
|
|
|
+ // 鍒犻櫎 鈥滅瓑寰呯炕寮€鈥� 鐨勭壒鏁�
|
|
|
|
+ if (_effectUIDic.ContainsKey("CK_Loop_Wait_Chen" + index))
|
|
{
|
|
{
|
|
EffectUIPool.Recycle(_effectUIDic["CK_Loop_Wait_Chen" + index]);
|
|
EffectUIPool.Recycle(_effectUIDic["CK_Loop_Wait_Chen" + index]);
|
|
_effectUIDic.Remove("CK_Loop_Wait_Chen" + index);
|
|
_effectUIDic.Remove("CK_Loop_Wait_Chen" + index);
|
|
@@ -437,15 +442,15 @@ namespace GFGGame
|
|
if (!item.m_comIcon.m_imgNew.visible)
|
|
if (!item.m_comIcon.m_imgNew.visible)
|
|
_recordTurnIndex.Add(index);
|
|
_recordTurnIndex.Add(index);
|
|
|
|
|
|
- //先翻开牌面
|
|
|
|
|
|
+ //鍏堢炕寮€鐗岄潰
|
|
item.m_comIcon.m_FlipOpenType.selectedIndex = 0;
|
|
item.m_comIcon.m_FlipOpenType.selectedIndex = 0;
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemIdList[index]);
|
|
ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemIdList[index]);
|
|
item.m_t2.Play();
|
|
item.m_t2.Play();
|
|
|
|
|
|
- // 点击特效
|
|
|
|
|
|
+ // 鐐瑰嚮鐗规晥
|
|
_effectUIDic.Add("CK_Cirle_DJ" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_click_eff, "ui_LuckyBox", "CK_Cirle_DJ"));
|
|
_effectUIDic.Add("CK_Cirle_DJ" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_click_eff, "ui_LuckyBox", "CK_Cirle_DJ"));
|
|
|
|
|
|
- // 翻开特效
|
|
|
|
|
|
+ // 缈诲紑鐗规晥
|
|
switch (itemCfg.rarity)
|
|
switch (itemCfg.rarity)
|
|
{
|
|
{
|
|
case 1:
|
|
case 1:
|
|
@@ -477,6 +482,5 @@ namespace GFGGame
|
|
ViewManager.Hide<LuckyBoxNewDressView>();
|
|
ViewManager.Hide<LuckyBoxNewDressView>();
|
|
ViewManager.Hide<LuckyBoxNewCardView>();
|
|
ViewManager.Hide<LuckyBoxNewCardView>();
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|