LuckyBoxBonusShowView.cs 25 KB

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