LuckyBoxBonusShowView.cs 25 KB

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