LuckyBoxBonusShowView.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. using UnityEngine;
  2. using FairyGUI;
  3. using UI.LuckyBox;
  4. using System.Collections.Generic;
  5. using System.Collections;
  6. namespace GFGGame
  7. {
  8. public class LuckyBoxBonusShowView : BaseWindow
  9. {
  10. private UI_LuckBoxBonusShowUI _ui;
  11. private List<ItemData> _rewardList = new List<ItemData>();
  12. private List<ItemData> _rewardItemList = new List<ItemData>();
  13. private Dictionary<int, Dictionary<int, EffectUI>> _effListTen = new Dictionary<int, Dictionary<int, EffectUI>>();
  14. private Dictionary<int, EffectUI> _effList = new Dictionary<int, EffectUI>();
  15. private Dictionary<int, bool> _itemHasNew = new Dictionary<int, bool>();
  16. private Dictionary<int, int> _itemIdList = new Dictionary<int, int>();
  17. private Dictionary<int, GComponent> _itemObjList = new Dictionary<int, GComponent>();
  18. private List<int> _recordOpenIndex = new List<int>(); //记录打开过得item位置
  19. private List<int> _recordTurnIndex = new List<int>(); //记录播放过item位置
  20. private int _chooseIndex = -1; //当前选中的index
  21. private int _countShow = 0; //第几次展示
  22. private bool _handClick = false; //手动点击开启
  23. private bool _AnimationWait = true; //抽卡动画等待加载完毕
  24. bool _touchLoaBg = true; //防止点击背景事件太快
  25. private EffectUI _effectUI1;
  26. private EffectUI _effectUI2;
  27. private EffectUI _effectUI3;
  28. private Dictionary<string, EffectUI> _effectUIDic = new Dictionary<string, EffectUI>();
  29. public override void Dispose()
  30. {
  31. EffectUIPool.Recycle(_effectUI1);
  32. _effectUI1 = null;
  33. EffectUIPool.Recycle(_effectUI2);
  34. _effectUI2 = null;
  35. EffectUIPool.Recycle(_effectUI3);
  36. _effectUI3 = null;
  37. for (int key = 0; key < _effListTen.Count; key++)
  38. {
  39. if (_effListTen.ContainsKey(key))
  40. {
  41. for (int key1 = 0; key1 < _effListTen[key].Count; key1++)
  42. {
  43. if (_effListTen[key].ContainsKey(key1))
  44. {
  45. EffectUIPool.Recycle(_effListTen[key][key1]);
  46. _effListTen[key][key1] = null;
  47. }
  48. }
  49. }
  50. }
  51. _effListTen.Clear();
  52. for (int key = 0; key < _effList.Count; key++)
  53. {
  54. if (_effList.ContainsKey(key))
  55. {
  56. EffectUIPool.Recycle(_effList[key]);
  57. _effList[key] = null;
  58. }
  59. }
  60. _effList.Clear();
  61. if (_ui != null)
  62. {
  63. _ui.Dispose();
  64. _ui = null;
  65. }
  66. base.Dispose();
  67. }
  68. protected override void OnInit()
  69. {
  70. base.OnInit();
  71. packageName = UI_LuckBoxBonusShowUI.PACKAGE_NAME;
  72. _ui = UI_LuckBoxBonusShowUI.Create();
  73. this.viewCom = _ui.target;
  74. isfullScreen = true;
  75. _ui.m_loaBg.onClick.Add(OnClickLoaBg);
  76. _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zx_bg");
  77. _ui.m_BtnPass.onClick.Add(OnClickBtnPass);
  78. UpdateEffect();
  79. }
  80. private void UpdateEffect()
  81. {
  82. _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holder_star, "ui_LuckyBox", "bg_liuxing");
  83. _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_holder_bg, "ui_LuckyBox", "CK_UI");
  84. _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_holder_cloud, "ui_LuckyBox", "bg_cloud");
  85. }
  86. protected override void AddEventListener()
  87. {
  88. base.AddEventListener();
  89. EventAgent.AddEventListener(ConstMessage.LUCKY_BOX_REWARD_SHOW, ReferNextShow);
  90. EventAgent.AddEventListener(ConstMessage.LUCKY_BOX_ANIMATION_WAIT, SetAnimationWait);
  91. EventAgent.AddEventListener(ConstMessage.LUCKY_BOX_SHOW_VIEW_CLOSE, OthershowViewClose);
  92. }
  93. protected override void RemoveEventListener()
  94. {
  95. base.RemoveEventListener();
  96. EventAgent.RemoveEventListener(ConstMessage.LUCKY_BOX_REWARD_SHOW, ReferNextShow);
  97. EventAgent.RemoveEventListener(ConstMessage.LUCKY_BOX_ANIMATION_WAIT, SetAnimationWait);
  98. EventAgent.RemoveEventListener(ConstMessage.LUCKY_BOX_SHOW_VIEW_CLOSE, OthershowViewClose);
  99. }
  100. protected void OthershowViewClose()
  101. {
  102. _ui.m_touchFlipOpen.touchable = false;
  103. }
  104. protected void ReferNextShow()
  105. {
  106. if (GetSuitItemController.isAuto)
  107. return;
  108. int suitId = 0;
  109. if(_itemIdList.ContainsKey(_chooseIndex))
  110. suitId = SuitCfgArray.Instance.GetSuitIdOfItem(_itemIdList[_chooseIndex]);
  111. if (_chooseIndex != -1 && suitId > 0)
  112. ClickItem(_chooseIndex);
  113. else
  114. {
  115. if (_handClick)
  116. {
  117. _handClick = false;
  118. _ui.m_touchFlipOpen.touchable = false;
  119. }
  120. }
  121. }
  122. protected override void OnShown()
  123. {
  124. base.OnShown();
  125. _touchLoaBg = false;
  126. _rewardList.AddRange(this.viewData as List<ItemData>);
  127. _itemIdList.Clear();
  128. _itemObjList.Clear();
  129. _recordOpenIndex.Clear();
  130. _recordTurnIndex.Clear();
  131. _itemHasNew.Clear();
  132. _ui.m_BtnPass.visible = true;
  133. _ui.m_touchFlipOpen.touchable = false;
  134. GetSuitItemController.isAuto = false;
  135. if (_rewardList.Count == 1)
  136. {
  137. _ui.m_c1.selectedIndex = 0;
  138. UpdateItem(_ui.m_itemOne.target, 0, 1);
  139. }
  140. else
  141. {
  142. _ui.m_c1.selectedIndex = 1;
  143. for (int i = 0; i < _rewardList.Count; i++)
  144. {
  145. UpdateItem(_ui.target.GetChild("item" + i).asCom, i, 10);
  146. }
  147. }
  148. Timers.inst.Add(0.5f, 1, UpDataTimeTouchLoaBg);
  149. }
  150. protected override void OnHide()
  151. {
  152. _rewardList.Clear();
  153. base.OnHide();
  154. Timers.inst.Remove(UpDataTime);
  155. Timers.inst.Remove(UpClickDataTime);
  156. Timers.inst.Remove(touchFlipOpen);
  157. Timers.inst.Remove(UpDataTimeTouchLoaBg);
  158. GetSuitItemController.isAuto = false;
  159. _touchLoaBg = true;
  160. foreach (var v in _effectUIDic)
  161. {
  162. EffectUIPool.Recycle(v.Value);
  163. }
  164. _effectUIDic.Clear();
  165. EventAgent.DispatchEvent(ConstMessage.LUCKY_BOX_BONUS_VIEW_CLOSE);
  166. }
  167. private void UpdateItem(GComponent com, int index, int countType)
  168. {
  169. UI_LuckyBoxBonusShowItem item = UI_LuckyBoxBonusShowItem.Proxy(com);
  170. ItemData itemData = _rewardList[index];
  171. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
  172. item.m_comIcon.m_c1.selectedIndex = itemCfg.rarity;
  173. item.m_comIcon.m_txtName.text = itemCfg.name;
  174. item.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
  175. item.m_comIcon.m_FlipOpenType.selectedIndex = 1;
  176. item.m_comIcon.m_t1.Play();
  177. // 圆盘出现时等待玩家点击的特效
  178. switch (itemCfg.rarity)
  179. {
  180. case 1:
  181. break;
  182. case 2:
  183. break;
  184. case 3:
  185. _effectUIDic.Add("CK_Loop_Wait_Chen" + index, EffectUIPool.CreateEffectUI(item.m_waitClick_eff, "ui_LuckyBox", "CK_Loop_Wait_Chen"));
  186. break;
  187. case 4:
  188. _effectUIDic.Add("CK_Loop_Wait_GS" + index, EffectUIPool.CreateEffectUI(item.m_waitClick_eff, "ui_LuckyBox", "CK_Loop_Wait_GS"));
  189. break;
  190. case 5:
  191. _effectUIDic.Add("CK_Loop_Wait_Jin" + index, EffectUIPool.CreateEffectUI(item.m_waitClick_eff, "ui_LuckyBox", "CK_Loop_Wait_Jin"));
  192. break;
  193. }
  194. //带特效的处理先注释
  195. //item.m_comIcon.m_holder.visible = false;
  196. //item.m_comIcon.m_holder1.visible = false;
  197. //if (itemCfg.rarity > 2) {
  198. // string resPath = itemCfg.rarity == ConstDressRarity.Rarity_TIANYI ? "CK_all_01" : "CK_all_02";
  199. // GGraph holder = itemCfg.rarity == 3 ? item.m_comIcon.m_holder : item.m_comIcon.m_holder1;
  200. // holder.visible = true;
  201. // if (countType == 10 && (!_effListTen.ContainsKey(index) ||
  202. // ((itemCfg.rarity == 3 && !_effListTen[index].ContainsKey(0)) || (itemCfg.rarity == 4 && !_effListTen[index].ContainsKey(1)))))
  203. // {
  204. // EffectUI _effectUI = EffectUIPool.CreateEffectUI(holder, "ui_LuckyBox", resPath);
  205. // if (!_effListTen.ContainsKey(index))
  206. // {
  207. // Dictionary<int, EffectUI> effectList = new Dictionary<int, EffectUI>();
  208. // if (itemCfg.rarity == 3)
  209. // effectList.Add(0, _effectUI);
  210. // else if (itemCfg.rarity == 4)
  211. // effectList.Add(1, _effectUI);
  212. // _effListTen.Add(index, effectList);
  213. // }
  214. // else {
  215. // if (itemCfg.rarity == 3)
  216. // _effListTen[index].Add(0, _effectUI);
  217. // else if (itemCfg.rarity == 4)
  218. // _effListTen[index].Add(1, _effectUI);
  219. // }
  220. // }
  221. // if (countType == 1 &&
  222. // ((itemCfg.rarity == 3 && !_effList.ContainsKey(0)) || (itemCfg.rarity == 4 && !_effList.ContainsKey(1))))
  223. // {
  224. // EffectUI _effectUI = EffectUIPool.CreateEffectUI(holder, "ui_LuckyBox", resPath);
  225. // if (itemCfg.rarity == 3)
  226. // _effList.Add(0, _effectUI);
  227. // else if (itemCfg.rarity == 4)
  228. // _effList.Add(1, _effectUI);
  229. // }
  230. //}
  231. int count = 0;
  232. bool isFirst = false;
  233. for (int i = 0; i < _rewardList.Count; i++)
  234. {
  235. if (_rewardList[i].id == itemData.id) count++;
  236. if (count == 1 && i == index) isFirst = true;
  237. }
  238. item.m_comIcon.m_imgNew.visible = count == ItemDataManager.GetItemNum(itemData.id) && isFirst;
  239. if (_itemHasNew.ContainsKey(index))
  240. _itemHasNew[index] = item.m_comIcon.m_imgNew.visible;
  241. else
  242. _itemHasNew.Add(index, item.m_comIcon.m_imgNew.visible);
  243. item.m_t0.Play();
  244. if (item.target.data == null)
  245. {
  246. item.target.onClick.Add(ShowItemTips);
  247. }
  248. item.target.data = index;
  249. _itemIdList.Add(index, itemCfg.id);
  250. _itemObjList.Add(index, com);
  251. UI_LuckyBoxBonusShowItem.ProxyEnd();
  252. }
  253. private void ShowItemTips(EventContext context)
  254. {
  255. if (!_touchLoaBg)
  256. {
  257. return;
  258. }
  259. _touchLoaBg = false;
  260. Timers.inst.Add(0.5f, 1, UpDataTimeTouchLoaBg);
  261. GObject obj = context.sender as GObject;
  262. int index = (int)obj.data;
  263. _chooseIndex = index;
  264. HandClickItem(index);
  265. }
  266. private void HandClickItem(int index)
  267. {
  268. _ui.m_touchFlipOpen.touchable = true;
  269. _handClick = true;
  270. ClickItem(index);
  271. //翻牌动画
  272. Timers.inst.Add(1f, 1, UpClickDataTime, index);
  273. }
  274. private void UpClickDataTime(object param = null)
  275. {
  276. int index = (int)param;
  277. Timers.inst.Remove(UpClickDataTime);
  278. if (_recordTurnIndex.Contains(index) && _recordOpenIndex.Contains(index))
  279. {
  280. HideOtherShowWindow();
  281. _ui.m_touchFlipOpen.touchable = false;
  282. }
  283. else
  284. ClickItem(index);
  285. }
  286. void ClickItem(int index)
  287. {
  288. if (_recordOpenIndex.Count >= _rewardList.Count)
  289. _ui.m_BtnPass.visible = false;
  290. if (!_recordOpenIndex.Contains(index))
  291. TurnItem(index);
  292. else
  293. {
  294. if (!_recordTurnIndex.Contains(index))
  295. ShowTurnItem(index);
  296. else
  297. GoodsItemTipsController.ShowItemTips(_itemIdList[index]);
  298. }
  299. }
  300. private void UpDataTimeTouchLoaBg(object param = null)
  301. {
  302. _touchLoaBg = true;
  303. }
  304. private void OnClickLoaBg(EventContext context)
  305. {
  306. if (!_touchLoaBg)
  307. {
  308. return;
  309. }
  310. _touchLoaBg = false;
  311. Timers.inst.Add(0.5f, 1, UpDataTimeTouchLoaBg);
  312. if (_recordOpenIndex.Count >= _rewardList.Count)
  313. {
  314. _chooseIndex = -1;
  315. this.Hide();
  316. }
  317. else
  318. {
  319. for (int index = 0; index < _rewardList.Count; index++)
  320. {
  321. if (!_recordOpenIndex.Contains(index))
  322. {
  323. _chooseIndex = index;
  324. HandClickItem(index);
  325. break;
  326. }
  327. }
  328. }
  329. }
  330. private void OnClickBtnPass()
  331. {
  332. for (int index = 0; index < _rewardList.Count; index++)
  333. {
  334. if (!_recordOpenIndex.Contains(index))
  335. {
  336. int count = 0;
  337. bool isFirst = false;
  338. for (int i = 0; i < _rewardList.Count; i++)
  339. {
  340. if (_rewardList[i].id == _rewardList[index].id) count++;
  341. if (count == 1 && i == index) isFirst = true;
  342. }
  343. bool open = count == ItemDataManager.GetItemNum(_rewardList[index].id) && isFirst;
  344. if (!open)
  345. {
  346. _chooseIndex = -1;
  347. ClickItem(index);
  348. }
  349. }
  350. }
  351. ClickPass();
  352. }
  353. private void ClickPass()
  354. {
  355. GetSuitItemController.isAuto = true;
  356. _ui.m_touchFlipOpen.touchable = true;
  357. _ui.m_BtnPass.visible = false;
  358. for (int i = 0; i < _rewardList.Count; i++)
  359. {
  360. TurnItem(i);
  361. }
  362. //展示获得物品
  363. Timers.inst.Add(LuckyBoxDataManager.ANIMATION_TIME, 0, UpDataTime);
  364. }
  365. private void UpDataTime(object param = null)
  366. {
  367. _ui.m_touchFlipOpen.touchable = true;
  368. if (_recordTurnIndex.Count >= _rewardList.Count)
  369. {
  370. Timers.inst.Remove(UpDataTime);
  371. HideOtherShowWindow();
  372. _ui.m_touchFlipOpen.touchable = false;
  373. GetSuitItemController.isAuto = false;
  374. }
  375. for (int i = 0; i < _rewardList.Count; i++)
  376. {
  377. if (!_recordTurnIndex.Contains(i))
  378. {
  379. ShowTurnItem(i);
  380. break;
  381. }
  382. }
  383. }
  384. //控制展示获得物品界面
  385. private void ShowTurnItem(int index)
  386. {
  387. UI_LuckyBoxBonusShowItem item = UI_LuckyBoxBonusShowItem.Proxy(_itemObjList[index]);
  388. if (!_AnimationWait)
  389. return;
  390. if (item.m_comIcon.m_imgNew.visible)
  391. {
  392. _countShow += 1;
  393. //判断是否有套装需要展示
  394. int suitId = SuitCfgArray.Instance.GetSuitIdOfItem(_itemIdList[index]);
  395. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemIdList[index]);
  396. if (suitId > 0 && itemCfg.itemType != ConstItemType.CARD)
  397. {
  398. if (_countShow == 1)
  399. {
  400. ViewManager.Hide<SuitItemView>();
  401. ViewManager.Hide<LuckyBoxNewCardView>();
  402. ViewManager.Hide<GetSuitItemVIew>();
  403. _rewardItemList.Clear();
  404. _rewardItemList.Add(_rewardList[index]);
  405. ViewManager.Show<LuckyBoxNewDressView>(_rewardItemList);
  406. }
  407. else
  408. {
  409. ViewManager.Hide<LuckyBoxNewDressView>();
  410. ViewManager.Hide<LuckyBoxNewCardView>();
  411. int count = 0;
  412. int totalCount = 0;
  413. DressUpMenuSuitDataManager.GetSuitProgressBySuitId(suitId, out count, out totalCount);
  414. if (_countShow == 2) //展示进度条界面
  415. {
  416. int countSuitId = 0;
  417. for (int i = index + 1; i < _rewardList.Count; i++)
  418. {
  419. _itemHasNew.TryGetValue(i, out bool isNew);
  420. var itemRewardCfg = ItemCfgArray.Instance.GetCfg(_rewardList[i].id);
  421. if (isNew && itemRewardCfg.itemType == ConstItemType.DRESS_UP && itemRewardCfg.suitId == suitId) {
  422. countSuitId++;
  423. }
  424. }
  425. count = count - countSuitId;
  426. ViewManager.Show<SuitItemView>(new object[] { suitId, countSuitId });
  427. }
  428. else if (_countShow == 3) //展示集齐套装界面
  429. {
  430. ViewManager.Hide<SuitItemView>();
  431. ViewManager.Show<GetSuitItemVIew>(suitId);
  432. _AnimationWait = false;
  433. }
  434. //判断是否需要显示集齐套装界面(需要的时候晚3个定时器时间)
  435. if (count <= 0 || totalCount <= 0 || count < totalCount || (count >= totalCount && _countShow > 5))
  436. {
  437. _recordTurnIndex.Add(index);
  438. _countShow = 0;
  439. if (_handClick)
  440. {
  441. _handClick = false;
  442. _ui.m_touchFlipOpen.touchable = false;
  443. }
  444. }
  445. }
  446. }
  447. else
  448. {
  449. //词牌和不是套装进这里
  450. ViewManager.Hide<SuitItemView>();
  451. ViewManager.Hide<LuckyBoxNewCardView>();
  452. ViewManager.Hide<GetSuitItemVIew>();
  453. _rewardItemList.Clear();
  454. _rewardItemList.Add(_rewardList[index]);
  455. ViewManager.Show<LuckyBoxNewDressView>(_rewardItemList);
  456. _recordTurnIndex.Add(index);
  457. _countShow = 0;
  458. Timers.inst.Add(1.5f, 1, touchFlipOpen); //防止点击太快
  459. }
  460. }
  461. else
  462. {
  463. _recordTurnIndex.Add(index);
  464. _ui.m_touchFlipOpen.touchable = false;
  465. }
  466. UI_LuckyBoxBonusShowItem.ProxyEnd();
  467. }
  468. private void touchFlipOpen(object param)
  469. {
  470. Timers.inst.Remove(touchFlipOpen);
  471. _ui.m_touchFlipOpen.touchable = false;
  472. }
  473. private void TurnItem(int index)
  474. {
  475. if (!_recordOpenIndex.Contains(index))
  476. {
  477. // 删除 “等待翻开” 的特效
  478. if (_effectUIDic.ContainsKey("CK_Loop_Wait_Chen" + index))
  479. {
  480. EffectUIPool.Recycle(_effectUIDic["CK_Loop_Wait_Chen" + index]);
  481. _effectUIDic.Remove("CK_Loop_Wait_Chen" + index);
  482. }
  483. if (_effectUIDic.ContainsKey("CK_Loop_Wait_GS" + index))
  484. {
  485. EffectUIPool.Recycle(_effectUIDic["CK_Loop_Wait_GS" + index]);
  486. _effectUIDic.Remove("CK_Loop_Wait_GS" + index);
  487. }
  488. if (_effectUIDic.ContainsKey("CK_Loop_Wait_Jin" + index))
  489. {
  490. EffectUIPool.Recycle(_effectUIDic["CK_Loop_Wait_Jin" + index]);
  491. _effectUIDic.Remove("CK_Loop_Wait_Jin" + index);
  492. }
  493. UI_LuckyBoxBonusShowItem item = UI_LuckyBoxBonusShowItem.Proxy(_itemObjList[index]);
  494. if (!item.m_comIcon.m_imgNew.visible)
  495. _recordTurnIndex.Add(index);
  496. //先翻开牌面
  497. item.m_comIcon.m_FlipOpenType.selectedIndex = 0;
  498. //item.m_t1.Play();
  499. item.m_t2.Play();
  500. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemIdList[index]);
  501. // 点击特效
  502. _effectUIDic.Add("CK_Cirle_DJ" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_click_eff, "ui_LuckyBox", "CK_Cirle_DJ"));
  503. // 翻开特效
  504. switch (itemCfg.rarity)
  505. {
  506. case 1:
  507. _effectUIDic.Add("CK_OpenAfter_LanHui_UI" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_ui_eff, "ui_LuckyBox", "CK_OpenAfter_HuiLan_UI"));
  508. _effectUIDic.Add("CK_OpenAfter_LanHui_TX" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_flip_eff, "ui_LuckyBox", "CK_OpenAfter_LanHui_TX"));
  509. break;
  510. case 2:
  511. _effectUIDic.Add("CK_OpenAfter_LanHui_UI" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_ui_eff, "ui_LuckyBox", "CK_OpenAfter_LanHui_UI"));
  512. _effectUIDic.Add("CK_OpenAfter_LanHui_TX" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_flip_eff, "ui_LuckyBox", "CK_OpenAfter_LanHui_TX"));
  513. break;
  514. case 3:
  515. _effectUIDic.Add("CK_OpenAfter_Chen_UI" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_ui_eff, "ui_LuckyBox", "CK_OpenAfter_Chen_UI"));
  516. _effectUIDic.Add("CK_OpenAfter_Chen_TX" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_flip_eff, "ui_LuckyBox", "CK_OpenAfter_Chen_TX"));
  517. break;
  518. case 4:
  519. _effectUIDic.Add("CK_OpenAfter_GS_UI" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_ui_eff, "ui_LuckyBox", "CK_OpenAfter_GS_UI"));
  520. _effectUIDic.Add("CK_OpenAfter_GS_TX" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_flip_eff, "ui_LuckyBox", "CK_OpenAfter_GS_TX"));
  521. break;
  522. case 5:
  523. _effectUIDic.Add("CK_OpenAfter_Jin_UI" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_ui_eff, "ui_LuckyBox", "CK_OpenAfter_Jin_UI"));
  524. _effectUIDic.Add("CK_OpenAfter_Jin_TX" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_flip_eff, "ui_LuckyBox", "CK_OpenAfter_Jin_TX"));
  525. break;
  526. }
  527. item.m_comIcon.m_t0.Play();
  528. _recordOpenIndex.Add(index);
  529. UI_LuckyBoxBonusShowItem.ProxyEnd();
  530. }
  531. }
  532. private void HideOtherShowWindow()
  533. {
  534. ViewManager.Hide<SuitItemView>();
  535. ViewManager.Hide<GetSuitItemVIew>();
  536. ViewManager.Hide<LuckyBoxNewDressView>();
  537. ViewManager.Hide<LuckyBoxNewCardView>();
  538. }
  539. private void SetAnimationWait()
  540. {
  541. _AnimationWait = true;
  542. }
  543. }
  544. }