DressUpFightView.cs 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  1. using UI.DressUp;
  2. using FairyGUI;
  3. using UnityEngine;
  4. using System.Collections.Generic;
  5. using System;
  6. using ET;
  7. namespace GFGGame
  8. {
  9. public class DressUpFightView : BaseView
  10. {
  11. private UI_DressUpFightUI _ui;
  12. private int _fightID;
  13. private int _levelID;
  14. private float listType1X = 0;
  15. private float partsListX = 0;
  16. private DressUpListType currentListType;
  17. private int[] _currentList2;
  18. private GameObject _scenePrefab;
  19. private GameObject _sceneObject;
  20. private List<int> _currentList3 = new List<int>();
  21. private List<int> _currentList4 = new List<int>();
  22. private int _currentMenuType;
  23. private int _currentSuitId;
  24. private StoryLevelCfg _levelCfg;
  25. private StoryFightCfg _fightCfg;
  26. private const int SORT_BY_HIGH_SCORE = 0;
  27. private const int SORT_BY_LOW_SCORE = 1;
  28. private int _scoreIndex = SORT_BY_HIGH_SCORE;
  29. private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
  30. public override void Dispose()
  31. {
  32. if (_sceneObject != null)
  33. {
  34. GameObject.Destroy(_sceneObject);
  35. _sceneObject = null;
  36. }
  37. for (int i = 0; i < _listLongPress.Count; i++)
  38. {
  39. _listLongPress[i].Dispose();
  40. }
  41. if (_ui != null)
  42. {
  43. _ui.Dispose();
  44. _ui = null;
  45. }
  46. base.Dispose();
  47. }
  48. protected override void Init()
  49. {
  50. base.Init();
  51. packageName = UI_DressUpFightUI.PACKAGE_NAME;
  52. _ui = UI_DressUpFightUI.Create();
  53. viewCom = _ui.target;
  54. isfullScreen = true;
  55. _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneDressUp"));
  56. _ui.m_btnClose.width = GRoot.inst.width;
  57. _ui.m_btnClose.height = GRoot.inst.height;
  58. _ui.m_btnClose.AddRelation(GRoot.inst, RelationType.Size);
  59. }
  60. protected override void OnInit()
  61. {
  62. base.OnInit();
  63. _ui.m_groupTaskHint.visible = false;
  64. _ui.m_btnRepeal.visible = false;
  65. _ui.m_btnRenewal.visible = false;
  66. _ui.m_btnSearch.visible = true;
  67. // _ui.m_comboBox.items = new string[] { "我的套装一", "我的套装二", "我的套装三", "我的套装四", "我的套装五", "我的套装六" };
  68. _ui.m_partsList.m_comboBoxRarity.items = new string[] { "高分优先", "低分优先" };
  69. InitLists();
  70. _ui.m_partsList.m_comboBoxRarity.onChanged.Add(OnComboBoxRarityChanged);
  71. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  72. _ui.m_btnHome.onClick.Add(OnClickBtnHome);
  73. // _ui.m_btnClothingShop.onClick.Add(OnClickBtnClothingShop);
  74. // _ui.m_comboBox.onChanged.Add(OnComboBoxChanged);
  75. _ui.m_comListType1.m_listType.onClickItem.Add(OnClickListType1Item);
  76. _ui.m_comListType2.m_listType.onClickItem.Add(OnClickListType2Item);
  77. _ui.m_partsList.m_list.onClickItem.Add(OnClickPartsListItem);
  78. _ui.m_partsList2.m_list.onClickItem.Add(OnClickSuitPartsListItem);
  79. _ui.m_touchPad.onClick.Add(OnTouchPad);
  80. _ui.m_btnHint.onClick.Add(OnClickBtnHint);
  81. _ui.m_btnGuide.onClick.Add(OnTouchPad);
  82. _ui.m_btnClose.onClick.Add(OnClickBtnClose);
  83. _ui.m_btnDelete.onClick.Add(OnClickBtnDelete);
  84. _ui.m_btnNext.onClick.Add(OnClickBtnNext);
  85. _ui.m_btnRecommend.onClick.Add(OnClickBtnRecommend);
  86. _ui.m_btnSearch.onClick.Add(OnClickBtnSearch);
  87. _ui.m_btnAutoPlay.onClick.Add(OnClickBtnAutoPlay);
  88. _ui.m_compNeed.target.onClick.Add(OnClickComNeed);
  89. _ui.m_compNeed.m_listTag.itemRenderer = RenderListTagItem;
  90. // _ui.m_btnShow.onClick.Add(OnClickBtnShow);
  91. // _ui.m_btnHide.onClick.Add(OnClickBtnHide);
  92. // _ui.m_loaShow.onClick.Add(OnClickLoaShow);
  93. // _ui.m_btnHide.visible = false;
  94. // EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdatePartsListSort);
  95. _ui.m_partsList2.m_comboBoxRarity.visible = false;
  96. }
  97. protected override void AddEventListener()
  98. {
  99. base.AddEventListener();
  100. EventAgent.AddEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
  101. EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
  102. EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdatePartsListSort);
  103. EventAgent.AddEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
  104. }
  105. protected override void OnShown()
  106. {
  107. base.OnShown();
  108. InstanceZonesDataManager.usedRecommend = false;
  109. // _ui.m_comboBox.title = "我的套装";
  110. _ui.m_txtRecommendCount.SetVar("v1", "" + GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount)).FlushVars();
  111. _ui.m_txtRecommendCount.SetVar("v2", GlobalCfgArray.globalCfg.recommendCount.ToString()).FlushVars();
  112. _ui.m_btnRecommend.enabled = true;// GameGlobal.myNumericComponent.GetAsInt(ET.NumericType.RecommendCount) > 0;
  113. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  114. _ui.m_btnAutoPlay.selected = EquipDataCache.cacher.autoPlay;
  115. _ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
  116. _levelID = (int)viewData;
  117. InstanceZonesDataManager.currentLevelCfgId = _levelID;
  118. _levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  119. _fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
  120. if (_levelCfg.type == ConstInstanceZonesType.Field)
  121. {
  122. _fightCfg.scoreType = FieldDataManager.Instance.fieldInfos.theme;
  123. _ui.m_btnAutoPlay.visible = false;
  124. }
  125. _ui.m_compNeed.target.visible = _fightCfg.needItemId > 0 || _fightCfg.needSuitId > 0 || _fightCfg.needTagsArr.Length > 0;
  126. if (_ui.m_compNeed.target.visible)
  127. {
  128. _ui.m_compNeed.m_c1.selectedIndex = 0;
  129. if (_fightCfg.needItemId > 0)
  130. {
  131. _ui.m_compNeed.m_txtNeedName.text = ItemUtil.GetItemName(_fightCfg.needItemId);
  132. _ui.m_compNeed.target.data = _fightCfg.needItemId;
  133. }
  134. else if (_fightCfg.needSuitId > 0)
  135. {
  136. _ui.m_compNeed.m_txtNeedName.text = ItemUtil.GetSuitName(_fightCfg.needSuitId);
  137. _ui.m_compNeed.target.data = _fightCfg.needSuitId;
  138. }
  139. else
  140. {
  141. _ui.m_compNeed.m_c1.selectedIndex = 1;
  142. _ui.m_compNeed.m_listTag.numItems = _fightCfg.needTagsArr.Length;
  143. }
  144. }
  145. InstanceZonesDataManager.currentScoreType = _fightCfg.scoreType;
  146. //一级菜单
  147. _ui.m_comListType1.m_listType.RemoveChildrenToPool();
  148. _ui.m_comListType1.m_listType.numItems = DressUpMenuItemCfg1Array.Instance.dataArray.Length - 1;
  149. //_ui.m_comListType1.m_listType1.ResizeToFit(_ui.m_listType1.numItems);
  150. float maxHeight = _ui.target.height - _ui.m_comListType1.m_listType.y - DressUpView.BOTTOM_BLANK;
  151. if (_ui.m_comListType1.m_listType.height > maxHeight)
  152. {
  153. _ui.m_comListType1.m_listType.height = maxHeight;
  154. }
  155. _ui.m_comListType1.target.x = _ui.target.width;
  156. _ui.m_comListType2.target.x = _ui.target.width;
  157. _ui.m_partsList.target.x = _ui.target.width;
  158. _ui.m_partsList2.target.x = _ui.target.width;
  159. _ui.m_scoreType.url = "ui://CommonGame/kp_sx_" + _fightCfg.scoreType;
  160. this.showListType1();
  161. if (_sceneObject == null)
  162. {
  163. _sceneObject = GameObject.Instantiate(_scenePrefab);
  164. EquipDataCache.cacher.setSceneObj(_sceneObject);
  165. EquipDataCache.cacher.PutOnDefaultSuitSaved();
  166. }
  167. UpdateScore();
  168. SendLog();
  169. Timers.inst.AddUpdate(CheckGuide);
  170. }
  171. protected override void OnHide()
  172. {
  173. base.OnHide();
  174. _ui.m_groupTaskHint.visible = false;
  175. if (_sceneObject != null)
  176. {
  177. GameObject.Destroy(_sceneObject);
  178. _sceneObject = null;
  179. }
  180. _fightCfg = null;
  181. _levelCfg = null;
  182. DressUpMenuItemDataManager.Clear();
  183. Timers.inst.Remove(CheckGuide);
  184. }
  185. protected override void RemoveEventListener()
  186. {
  187. base.RemoveEventListener();
  188. EventAgent.RemoveEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
  189. EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdatePartsListSort);
  190. EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdatePartsListSort);
  191. EventAgent.RemoveEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
  192. }
  193. private void OnClickBtnBack()
  194. {
  195. Alert.Show("是否确定退出?")
  196. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  197. {
  198. if (_levelCfg.type == ConstInstanceZonesType.Studio)
  199. {
  200. ViewManager.Show(StudioDataManager.Instance.VIEW_NAME, new object[] { StudioDataManager.Instance.TYPE_SELECT_INDEX, StudioDataManager.Instance.PROPERTY_SELECT_INDEX }, ViewManager.GetGoBackDatas(StudioDataManager.Instance.VIEW_NAME));
  201. }
  202. else if (_levelCfg.type == ConstInstanceZonesType.Field)
  203. {
  204. ViewManager.GoBackFrom(ViewName.DRESS_UP_FIGHT_VIEW);
  205. }
  206. else
  207. {
  208. // ViewManager.GoBackFrom(ViewName.STORY_CHAPTER_VIEW);
  209. ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, _levelCfg.chapterId, new object[] { ViewName.STORY_CHAPTER_LIST_VIEW });
  210. }
  211. EquipDataCache.cacher.TakeOffAll();
  212. this.Hide();
  213. });
  214. // ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, StoryDataManager.currentChapter);
  215. }
  216. private void OnClickBtnHome()
  217. {
  218. Alert.Show("是否返回?")
  219. .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
  220. {
  221. EquipDataCache.cacher.TakeOffAll();
  222. GameController.GoBackToMainView();
  223. });
  224. }
  225. private void OnClickBtnClothingShop()
  226. {
  227. ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { null, _fightCfg.scoreType }, null, false, true);
  228. }
  229. private void OnClickListType1Item(EventContext context)
  230. {
  231. // GuideController.HideGuide();
  232. GObject typeItem = context.data as GObject;
  233. int order = (int)typeItem.data;
  234. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[order - 1];
  235. if (item1.subMenusArr.Length > 0)
  236. {
  237. this.showListType2(item1.subMenusArr);
  238. }
  239. else
  240. {
  241. if (this.showListParts(item1.type) == false)
  242. {
  243. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  244. return;
  245. }
  246. this.showListParts(item1.type);
  247. }
  248. this.hideListType1();
  249. UpdateListPartsSelected();
  250. }
  251. private void OnClickListType2Item(EventContext context)
  252. {
  253. GObject typeItem = context.data as GObject;
  254. int order = (int)typeItem.data;
  255. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[order - 1];
  256. if (this.showListParts(item2.type) == false)
  257. {
  258. PromptController.Instance.ShowFloatTextPrompt("未获得此类部件");
  259. return;
  260. }
  261. this.hideListType2();
  262. }
  263. private void OnClickPartsListItem(EventContext context)
  264. {
  265. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  266. {
  267. return;
  268. }
  269. GObject listItem = context.data as GObject;
  270. int id = (int)listItem.data;
  271. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  272. {
  273. this.showListParts2(id);
  274. this.hideListParts();
  275. EquipDataCache.cacher.PutOnSuitCfg(id, false, true);
  276. }
  277. else
  278. {
  279. EquipDataCache.cacher.TryCancelSuit(id);
  280. EquipDataCache.cacher.AddOrRemove(id, true);
  281. }
  282. UpdateListPartsSelected();
  283. UpdateListSuitPartsSelected();
  284. }
  285. private void OnClickSuitPartsListItem(EventContext context)
  286. {
  287. if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
  288. {
  289. return;
  290. }
  291. GObject listItem = (GObject)context.data as GObject;
  292. int id = (int)listItem.data;
  293. EquipDataCache.cacher.TryCancelSuit(id);
  294. EquipDataCache.cacher.AddOrRemove(id, true);
  295. UpdateListSuitPartsSelected();
  296. }
  297. private void OnLongPress(EventContext context)
  298. {
  299. LongPressGesture gesture = (LongPressGesture)context.sender;
  300. int itemId = (int)gesture.host.data;
  301. GoodsItemTipsController.ShowItemTips(itemId);
  302. }
  303. private void OnTouchPad()
  304. {
  305. if (this.currentListType == DressUpListType.List4)
  306. {
  307. this.hideListParts2();
  308. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  309. }
  310. else if (this.currentListType == DressUpListType.List3)
  311. {
  312. if (_currentList2 != null)
  313. {
  314. this.showListType2();
  315. }
  316. else
  317. {
  318. this.showListType1();
  319. }
  320. this.hideListParts();
  321. }
  322. else if (this.currentListType == DressUpListType.List2)
  323. {
  324. this.showListType1();
  325. this.hideListType2();
  326. }
  327. }
  328. private void OnClickBtnHint()
  329. {
  330. this.ShowTaskHint();
  331. }
  332. private void OnClickBtnDelete()
  333. {
  334. EquipDataCache.cacher.TakeOffAll();
  335. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  336. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  337. }
  338. private void OnClickBtnClose()
  339. {
  340. _ui.m_groupTaskHint.visible = false;
  341. }
  342. private void OnClickBtnNext()
  343. {
  344. if (!EquipDataCache.cacher.CheckPutOnFinish())
  345. {
  346. Alert.Show("只有换好衣服才能出门哦~")
  347. .SetRightButton(true, "好的");
  348. return;
  349. }
  350. int _suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit(); ;
  351. if (_fightCfg.needItemId > 0 && (_suitId <= 0 && EquipDataCache.cacher.equipDatas.IndexOf(_fightCfg.needItemId) < 0 || _suitId > 0 && Array.IndexOf(SuitCfgArray.Instance.GetCfg(_suitId).partsArr, _fightCfg.needItemId) < 0) || _fightCfg.needSuitId > 0 && _suitId != _fightCfg.needSuitId)
  352. {
  353. Alert.Show("未穿戴必须品~").SetRightButton(true, "好的");
  354. return;
  355. }
  356. if (CardDataManager.GetCardListByRarity(0).Count > 0)
  357. {
  358. ViewManager.Show<StoryCardChoose>(_fightCfg.scoreType);
  359. }
  360. else
  361. {
  362. StartCalculateScore();
  363. }
  364. }
  365. private void StartCalculateScore()
  366. {
  367. //不可移动代码位置
  368. bool hasFightTarget = _fightCfg.targetName != null && _fightCfg.targetName.Length > 0;
  369. if (_levelCfg.type == ConstInstanceZonesType.Field)
  370. {
  371. FieldFightDataManager.Instance.CurrentCardId = InstanceZonesDataManager.currentCardId;
  372. FieldFightDataManager.Instance.CurrentScoreType = InstanceZonesDataManager.currentScoreType;
  373. FieldFightDataManager.Instance.currentLevelCfgId = InstanceZonesDataManager.currentLevelCfgId;
  374. FieldFightDataManager.Instance.equipDatas = EquipDataCache.cacher.equipDatas;
  375. }
  376. if (hasFightTarget)
  377. {
  378. ViewManager.Show(ViewName.STORY_FIGHT_TARGET_VIEW);
  379. }
  380. else
  381. {
  382. ViewManager.Show(ViewName.STORY_FIGHT_SINGLE_VIEW);
  383. }
  384. this.Hide();
  385. }
  386. private void OnClickBtnRecommend()
  387. {
  388. if (this.currentListType == DressUpListType.List4)
  389. {
  390. this.hideListParts2();
  391. this.showListParts(ConstDressUpItemType.TAO_ZHUANG, true);
  392. }
  393. EquipDataCache.cacher.TryCancelSuit(_currentSuitId);
  394. InstanceZonesDataManager.usedRecommend = true;
  395. EquipDataCache.cacher.PutOnRecommendItems();
  396. UpdateListPartsSelected();
  397. UpdateListSuitPartsSelected();
  398. }
  399. private void InitLists()
  400. {
  401. _ui.m_comListType2.m_listType.itemRenderer = ListType2Item;
  402. _ui.m_partsList.m_list.itemRenderer = ListPartsItem;
  403. _ui.m_partsList2.m_list.itemRenderer = ListParts2Item;
  404. listType1X = _ui.m_comListType1.target.x;
  405. partsListX = _ui.m_partsList.target.x - _ui.m_partsList.target.width;
  406. //一级菜单
  407. _ui.m_comListType1.m_listType.itemRenderer = ListType1Item;
  408. }
  409. private void showListType1()
  410. {
  411. _currentList2 = null;
  412. currentListType = DressUpListType.List1;
  413. GTween.To(_ui.target.width, listType1X, 0.5f)
  414. .SetTarget(_ui.m_comListType1.target)
  415. .OnUpdate((GTweener t) =>
  416. {
  417. _ui.m_comListType1.target.x = t.value.x;
  418. });
  419. }
  420. private void hideListType1()
  421. {
  422. GTween.To(listType1X, _ui.target.width, 0.5f)
  423. .SetTarget(_ui.m_comListType1.target)
  424. .OnUpdate((GTweener t) =>
  425. {
  426. _ui.m_comListType1.target.x = t.value.x;
  427. });
  428. }
  429. private void showListType2(int[] menuStrArr = null)
  430. {
  431. currentListType = DressUpListType.List2;
  432. if (menuStrArr != null && menuStrArr.Length > 0)
  433. {
  434. int len = menuStrArr.Length;
  435. _currentList2 = menuStrArr.Clone() as int[];
  436. _ui.m_comListType2.m_listType.RemoveChildrenToPool();
  437. _ui.m_comListType2.m_listType.numItems = len;
  438. //_ui.m_listType2.ResizeToFit(_ui.m_listType2.numItems);
  439. float maxHeight = _ui.target.height - _ui.m_comListType2.m_listType.y - DressUpView.BOTTOM_BLANK;
  440. if (_ui.m_comListType2.m_listType.height > maxHeight)
  441. {
  442. _ui.m_comListType2.m_listType.height = maxHeight;
  443. }
  444. }
  445. GTween.To(_ui.target.width, listType1X, 0.5f)
  446. .SetTarget(_ui.m_comListType2.target)
  447. .OnUpdate((GTweener t) =>
  448. {
  449. _ui.m_comListType2.target.x = t.value.x;
  450. });
  451. }
  452. private void hideListType2()
  453. {
  454. GTween.To(listType1X, _ui.target.width, 0.5f)
  455. .SetTarget(_ui.m_comListType2.target)
  456. .OnUpdate((GTweener t) =>
  457. {
  458. _ui.m_comListType2.target.x = t.value.x;
  459. });
  460. }
  461. private bool showListParts(int type, bool selectItem = false)
  462. {
  463. _currentMenuType = type;
  464. UpdatePartsListSort();
  465. if (_ui.m_partsList.m_list.numItems <= 0) return false;
  466. _ui.m_partsList.m_list.ResizeToFit(_ui.m_partsList.m_list.numItems);
  467. float maxHeight = _ui.m_partsList.target.height - _ui.m_partsList.m_list.y;
  468. if (_ui.m_partsList.m_list.height > maxHeight)
  469. {
  470. _ui.m_partsList.m_list.height = maxHeight;
  471. }
  472. if (selectItem)
  473. {
  474. int itemId = EquipDataCache.cacher.GetItemIdBuyType(_currentMenuType);
  475. if (itemId > 0)
  476. {
  477. int index = _currentList3.IndexOf(itemId);
  478. _ui.m_partsList.m_list.ScrollToView(index);
  479. }
  480. }
  481. currentListType = DressUpListType.List3;
  482. GTween.To(_ui.target.width, partsListX, 0.5f)
  483. .SetTarget(_ui.m_partsList)
  484. .OnUpdate((GTweener t) =>
  485. {
  486. _ui.m_partsList.target.x = t.value.x;
  487. });
  488. UpdateListPartsSelected();
  489. return true;
  490. }
  491. private void OnComboBoxRarityChanged()
  492. {
  493. _scoreIndex = _ui.m_partsList.m_comboBoxRarity.selectedIndex;
  494. this.UpdatePartsListSort();
  495. }
  496. private void UpdatePartsListSort()
  497. {
  498. if (_currentMenuType == 0) return;
  499. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  500. {
  501. _currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
  502. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  503. {
  504. _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
  505. }
  506. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  507. {
  508. _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
  509. }
  510. else
  511. {
  512. _currentList3.Reverse();
  513. }
  514. }
  515. else
  516. {
  517. _currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
  518. if (_scoreIndex == SORT_BY_HIGH_SCORE)
  519. {
  520. _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3);
  521. }
  522. else if (_scoreIndex == SORT_BY_LOW_SCORE)
  523. {
  524. _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3);
  525. }
  526. else
  527. {
  528. _currentList3.Reverse();
  529. }
  530. }
  531. if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  532. {
  533. _currentList3 = DressUpMenuItemDataManager.DressSearch(_currentList3, _currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG);
  534. }
  535. else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  536. {
  537. _currentList3 = DressUpMenuItemDataManager.DressFilter(_currentList3, _currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG);
  538. }
  539. //必穿品放在列表最前面
  540. if (_fightCfg.needItemId > 0)
  541. {
  542. int index = _currentList3.IndexOf(_fightCfg.needItemId);
  543. if (index >= 0)
  544. {
  545. int item = _currentList3[index];
  546. _currentList3.Remove(_currentList3[index]);
  547. _currentList3.Insert(0, item);
  548. }
  549. }
  550. else if (_fightCfg.needSuitId > 0)
  551. {
  552. int index = _currentList3.IndexOf(_fightCfg.needSuitId);
  553. if (index >= 0)
  554. {
  555. int item = _currentList3[index];
  556. _currentList3.Remove(_currentList3[index]);
  557. _currentList3.Insert(0, item);
  558. }
  559. }
  560. _ui.m_partsList.m_list.RemoveChildrenToPool();
  561. _ui.m_partsList.m_list.numItems = _currentList3.Count;
  562. }
  563. private void UpdateSuitPartsListSort()
  564. {
  565. if (_currentMenuType == 0) return;
  566. _currentList4 = new List<int>(SuitCfgManager.Instance.GetSuitItems(_currentSuitId, true));
  567. if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Search)
  568. {
  569. _currentList4 = DressUpMenuItemDataManager.DressSearch(_currentList4, false);
  570. }
  571. else if (DressUpMenuItemDataManager.dressFilterType == DressFilterType.Filter)
  572. {
  573. _currentList4 = DressUpMenuItemDataManager.DressFilter(_currentList4, false);
  574. }
  575. _ui.m_partsList2.m_list.RemoveChildrenToPool();
  576. _ui.m_partsList2.m_list.numItems = _currentList4.Count;
  577. }
  578. private void hideListParts()
  579. {
  580. GTween.To(partsListX, _ui.target.width, 0.5f)
  581. .SetTarget(_ui.m_partsList)
  582. .OnUpdate((GTweener t) =>
  583. {
  584. _ui.m_partsList.target.x = t.value.x;
  585. });
  586. }
  587. private void showListParts2(int suitId)
  588. {
  589. _currentSuitId = suitId;
  590. _ui.m_partsList2.m_comboBoxRarity.items = new string[] { "高稀有度", "低稀有度", "最近获得" };
  591. this.UpdateSuitPartsListSort();
  592. _ui.m_partsList2.m_list.ResizeToFit(_ui.m_partsList2.m_list.numItems);
  593. float maxHeight = _ui.m_partsList2.target.height - _ui.m_partsList2.m_list.y;// - DressUpView.BOTTOM_BLANK;
  594. if (_ui.m_partsList2.m_list.height > maxHeight)
  595. {
  596. _ui.m_partsList2.m_list.height = maxHeight;
  597. }
  598. currentListType = DressUpListType.List4;
  599. GTween.To(_ui.target.width, partsListX, 0.5f)
  600. .SetTarget(_ui.m_partsList2)
  601. .OnUpdate((GTweener t) =>
  602. {
  603. _ui.m_partsList2.target.x = t.value.x;
  604. });
  605. }
  606. private void hideListParts2()
  607. {
  608. _currentMenuType = ConstDressUpItemType.TAO_ZHUANG;
  609. GTween.To(partsListX, _ui.target.width, 0.5f)
  610. .SetTarget(_ui.m_partsList2)
  611. .OnUpdate((GTweener t) =>
  612. {
  613. _ui.m_partsList2.target.x = t.value.x;
  614. });
  615. }
  616. private void ListType1Item(int index, GObject item)
  617. {
  618. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  619. DressUpMenuItemCfg1 item1 = DressUpMenuItemCfg1Array.Instance.dataArray[index];
  620. typeItem.m_icon.url = "ui://DressUp/hz_fenleitu_" + item1.id;
  621. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconzi_" + item1.id;
  622. typeItem.target.data = item1.id;
  623. typeItem.m_imgNeed.visible = ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, item1.id);
  624. UI_TypeItem.ProxyEnd();
  625. }
  626. private void ListType2Item(int index, GObject item)
  627. {
  628. UI_TypeItem typeItem = UI_TypeItem.Proxy(item);
  629. DressUpMenuItemCfg2 item2 = DressUpMenuItemCfg2Array.Instance.dataArray[_currentList2[index] - 1];
  630. typeItem.m_icon.url = "ui://DressUp/hz_fenleituej_" + item2.id;
  631. //typeItem.m_imgTitle.url = "ui://DressUp/hz_iconziej_" + item2.id;
  632. typeItem.target.data = item2.id;
  633. var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  634. typeItem.m_imgNeed.visible = subType == item2.type;
  635. UI_TypeItem.ProxyEnd();
  636. }
  637. private void ListPartsItem(int index, GObject item)
  638. {
  639. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  640. int id = (int)_currentList3[index];
  641. string iconRes = "";
  642. string partName = "";
  643. string ext = "png";
  644. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  645. {
  646. SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(id);
  647. iconRes = suitCfg.res;
  648. partName = suitCfg.name;
  649. listItem.m_iconSelected.visible = false;
  650. listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
  651. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
  652. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
  653. }
  654. else
  655. {
  656. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  657. iconRes = itemCfg.res;
  658. partName = itemCfg.name;
  659. listItem.m_iconSelected.visible = EquipDataCache.cacher.CheckDressUpItemIsOn(id);
  660. listItem.m_txtScore.text = "" + DressUpMenuItemDataManager.GetItemScore(id);
  661. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  662. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  663. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
  664. }
  665. if (listItem.target.data == null)
  666. {
  667. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  668. longPressGesture.once = true;
  669. longPressGesture.onAction.Add(OnLongPress);
  670. _listLongPress.Add(longPressGesture);
  671. }
  672. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  673. listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + _fightCfg.scoreType;
  674. listItem.m_txtTitle.text = partName;
  675. listItem.target.data = id;
  676. listItem.m_imgNeed.visible = _fightCfg.needItemId == id || _fightCfg.needSuitId == id;
  677. UI_PartsListItem.ProxyEnd();
  678. }
  679. private void ListParts2Item(int index, GObject item)
  680. {
  681. UI_PartsListItem listItem = UI_PartsListItem.Proxy(item);
  682. int id = (int)_currentList4[index];
  683. string iconRes = "";
  684. string partName = "";
  685. string ext = "png";
  686. if (listItem.target.data == null)
  687. {
  688. LongPressGesture longPressGesture = new LongPressGesture(listItem.target);
  689. longPressGesture.once = true;
  690. longPressGesture.onAction.Add(OnLongPress);
  691. _listLongPress.Add(longPressGesture);
  692. }
  693. ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(id);
  694. iconRes = itemCfg.res;
  695. partName = itemCfg.name;
  696. listItem.m_iconSelected.visible = EquipDataCache.cacher.CheckDressUpItemIsOn(id);
  697. listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
  698. RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
  699. ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType);
  700. listItem.m_ScoreType.visible = true;
  701. // int mainScore;
  702. // int mainValuel;
  703. // ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
  704. listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + _fightCfg.scoreType);
  705. listItem.m_txtScore.text = "" + DressUpMenuItemDataManager.GetItemScore(id, _fightCfg.scoreType);
  706. listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
  707. listItem.m_txtTitle.text = partName;
  708. listItem.target.data = id;
  709. // listItem.m_txtScore.visible = false;
  710. //listItem.m_ScoreType.visible = true;
  711. listItem.m_imgNeed.visible = false;
  712. UI_PartsListItem.ProxyEnd();
  713. }
  714. private void UpdateListPartsSelected()
  715. {
  716. int count = _ui.m_partsList.m_list.numChildren;
  717. int suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit();
  718. for (int i = 0; i < count; i++)
  719. {
  720. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList.m_list.GetChildAt(i));
  721. int id = (int)listItem.target.data;
  722. if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
  723. {
  724. listItem.m_iconSelected.visible = suitId > 0 && id == suitId;
  725. }
  726. else
  727. {
  728. bool isPutOn = EquipDataCache.cacher.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  729. bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  730. bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  731. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  732. }
  733. UI_PartsListItem.ProxyEnd();
  734. }
  735. }
  736. private void UpdateListSuitPartsSelected()
  737. {
  738. int count = _ui.m_partsList2.m_list.numChildren;
  739. int suitId = DressUpMenuSuitDataManager.CheckCurDressIsSuit();
  740. for (int i = 0; i < count; i++)
  741. {
  742. UI_PartsListItem listItem = UI_PartsListItem.Proxy(_ui.m_partsList2.m_list.GetChildAt(i));
  743. int id = (int)listItem.target.data;
  744. bool isPutOn = EquipDataCache.cacher.CheckDressUpItemIsOn(id);//非套装金判断是否穿戴
  745. bool isSuit = !DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && SuitCfgManager.Instance.GetItemSuitId(id) == suitId;//非场景类, 若当前穿戴套装要判断item是否属于套装(更换场景类不会改变套装穿戴状态)
  746. bool isSceneSuit = DressUpMenuItemDataManager.CheckIsSceneType(id) && suitId > 0 && isPutOn;//场景类, 若当前穿戴套装要判断item是否属已穿戴
  747. listItem.m_iconSelected.visible = isPutOn || isSuit || isSceneSuit;
  748. UI_PartsListItem.ProxyEnd();
  749. }
  750. }
  751. private void ShowTaskHint()
  752. {
  753. _ui.m_groupTaskHint.visible = true;
  754. _ui.m_txtHint.text = _levelCfg.hint;
  755. if (this._ui.m_txtHint.textHeight > this._ui.m_txtHint.textFormat.size * 2)
  756. {
  757. this._ui.m_txtHint.align = AlignType.Left;
  758. }
  759. else
  760. {
  761. this._ui.m_txtHint.align = AlignType.Center;
  762. }
  763. }
  764. private void UpdateScore()
  765. {
  766. _ui.m_txtScore.text = "" + EquipDataCache.cacher.score;
  767. // GuideController.TryGuideDressUpFightViewBtnNext(_ui.m_btnNext);
  768. }
  769. private void OnClickBtnSearch()
  770. {
  771. ViewManager.Show<DressFilterView>(false, new object[] { ViewName.DRESS_UP_VIEW });
  772. }
  773. private void OnClickBtnAutoPlay()
  774. {
  775. EquipDataCache.cacher.autoPlay = _ui.m_btnAutoPlay.selected;
  776. }
  777. // private void OnClickBtnShow()
  778. // {
  779. // Timers.inst.Remove(SetBtnShowVisable);
  780. // _ui.m_c1.selectedIndex = 0;
  781. // _ui.m_btnHide.visible = true;
  782. // _ui.m_loaShow.visible = false;
  783. // _ui.m_btnShow.visible = false;
  784. // }
  785. // private void OnClickBtnHide()
  786. // {
  787. // _ui.m_c1.selectedIndex = 1;
  788. // _ui.m_btnHide.visible = false;
  789. // _ui.m_btnShow.visible = true;
  790. // _ui.m_loaShow.visible = true;
  791. // Timers.inst.Add(2f, 1, SetBtnShowVisable);
  792. // }
  793. // private void OnClickLoaShow()
  794. // {
  795. // Timers.inst.Remove(SetBtnShowVisable);
  796. // _ui.m_btnShow.alpha = 1;
  797. // Timers.inst.Add(2f, 1, SetBtnShowVisable);
  798. // _ui.m_btnShow.enabled = true;
  799. // }
  800. // private void SetBtnShowVisable(object param)
  801. // {
  802. // _ui.m_btnShow.enabled = false;
  803. // GTween.To(1, 0, 0.3f).SetTarget(_ui.m_btnShow, TweenPropType.Alpha);
  804. // }
  805. private void OnClickComNeed()
  806. {
  807. if (_fightCfg.needItemId <= 0 && _fightCfg.needSuitId <= 0)
  808. {
  809. return;
  810. }
  811. if (_fightCfg.needSuitId > 0)
  812. {
  813. ViewManager.Show(ViewName.SUIT_GUIDE_VIEW, new object[] { _ui.m_compNeed.target.data, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData } }, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData });
  814. }
  815. else
  816. {
  817. ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { _ui.m_compNeed.target.data, new object[] { ViewName.DRESS_UP_FIGHT_VIEW, this.viewData }, 1 });
  818. }
  819. }
  820. private void RenderListTagItem(int index, GObject obj)
  821. {
  822. UI.CommonGame.UI_ListTagItem item = UI.CommonGame.UI_ListTagItem.Proxy(obj);
  823. string[] tag = _fightCfg.needTagsArr[index].Split('_');
  824. item.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tag[0]);
  825. item.m_txtTag.text = tag[1];
  826. UI.CommonGame.UI_ListTagItem.ProxyEnd();
  827. }
  828. private bool CheckListCount(int type)
  829. {
  830. if (type == (int)ConstDressUpItemType.TAO_ZHUANG)
  831. {
  832. return DressUpMenuSuitDataManager.GetSuitIDList().Count > 0;
  833. }
  834. else
  835. {
  836. return DressUpMenuItemDataManager.getItemDatasByType(type).Count > 0;
  837. }
  838. }
  839. private void SendLog()
  840. {
  841. var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
  842. switch (levelCfg.type)
  843. {
  844. case ConstInstanceZonesType.Story:
  845. LogServerHelper.SendNodeLog((int)PlayParticipationEnum.CHUN_ZHONG_LOU, 2);
  846. break;
  847. case ConstInstanceZonesType.Studio:
  848. StudioCfg studioCfg = StudioCfgArray.Instance.GetCfg(levelCfg.chapterId);
  849. if (studioCfg.funId == typeof(StudioMetalView).Name)
  850. {
  851. LogServerHelper.SendNodeLog((int)PlayParticipationEnum.JIN_SHU_XIU_FU, 2);
  852. }
  853. else if (studioCfg.funId == typeof(StudioFabricView).Name)
  854. {
  855. LogServerHelper.SendNodeLog((int)PlayParticipationEnum.ZHI_WU_XIU_FU, 2);
  856. }
  857. else if (studioCfg.funId == typeof(StudioPropertyView).Name)
  858. {
  859. LogServerHelper.SendNodeLog((int)PlayParticipationEnum.SHU_HUA_XIU_FU, 2);
  860. }
  861. break;
  862. }
  863. }
  864. private void CheckGuide(object param)
  865. {
  866. if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0
  867. || GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0
  868. || GuideDataManager.IsGuideFinish(ConstGuideId.FIGHT_TIPS) <= 0)
  869. {
  870. UpdateToCheckGuide(null);
  871. }
  872. else
  873. {
  874. Timers.inst.Remove(CheckGuide);
  875. }
  876. }
  877. protected override void UpdateToCheckGuide(object param)
  878. {
  879. if (!ViewManager.CheckIsTopView(this.viewCom)) return;
  880. int syIndex = 0;
  881. int xzIndex = 0;
  882. int buyClothingIndex = 0;
  883. int buyClothingSubIndex = 0;
  884. int len = _ui.m_comListType1.m_listType.numChildren;
  885. for (int i = 0; i < len; i++)
  886. {
  887. UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType1.m_listType.GetChildAt(i));
  888. if (item != null)
  889. {
  890. int menuID = (int)item.target.data;
  891. DressUpMenuItemCfg1 dressUpMenuItemCfg1 = DressUpMenuItemCfg1Array.Instance.GetCfg(menuID);
  892. if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0 && dressUpMenuItemCfg1.type == ConstDressUpItemType.SHANG_YI)
  893. {
  894. syIndex = i;
  895. }
  896. if (GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0 && dressUpMenuItemCfg1.type == ConstDressUpItemType.XIA_ZHUANG)
  897. {
  898. xzIndex = i;
  899. }
  900. if (_fightCfg.needItemId > 0)
  901. {
  902. int type = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  903. if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0 && ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, dressUpMenuItemCfg1.id))
  904. {
  905. buyClothingIndex = i;
  906. }
  907. }
  908. }
  909. UI_TypeItem.ProxyEnd();
  910. }
  911. int len1 = _ui.m_comListType2.m_listType.numChildren;
  912. for (int i = 0; i < len1; i++)
  913. {
  914. UI_TypeItem item = UI_TypeItem.Proxy(_ui.m_comListType2.m_listType.GetChildAt(i));
  915. if (item != null)
  916. {
  917. int menuID = (int)item.target.data;
  918. DressUpMenuItemCfg2 dressUpMenuItemCfg2 = DressUpMenuItemCfg2Array.Instance.GetCfg(menuID);
  919. var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
  920. if (subType == dressUpMenuItemCfg2.type)
  921. {
  922. buyClothingSubIndex = i;
  923. }
  924. }
  925. UI_TypeItem.ProxyEnd();
  926. }
  927. int djcId = 10476;//点绛唇Id
  928. int djcIndex = 0;
  929. int buyClothingIdIndex = 0;
  930. for (int i = 0; i < _currentList3.Count; i++)
  931. {
  932. if (_currentList3[i] == djcId)
  933. {
  934. djcIndex = i;
  935. }
  936. if (_fightCfg.needItemId > 0 && _currentList3[i] == _fightCfg.needItemId)
  937. {
  938. buyClothingIdIndex = i;
  939. }
  940. }
  941. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.SINGLE_FIGHT, 3, "点击相应的分类,可以快速找到服饰", syIndex);
  942. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.SINGLE_FIGHT, 4, "", 0, true, (int)_ui.m_partsList.m_list.y);
  943. GuideController.TryGuide(_ui.m_btnGuide, ConstGuideId.SINGLE_FIGHT, 5, "", -1, true, 0, 0, 0, false);
  944. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.SINGLE_FIGHT, 6, "接下来把裙子也换上", xzIndex);
  945. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.SINGLE_FIGHT, 7, "", 0, true, (int)_ui.m_partsList.m_list.y);
  946. GuideController.TryGuide(_ui.m_btnNext, ConstGuideId.SINGLE_FIGHT, 8, "穿着完毕,来验证一下,换上的服饰是否符合需求");
  947. GuideController.TryGuide(_ui.m_compNeed.target, ConstGuideId.BUY_CLOTHING, 3, "当提示有“必需品”时,需要穿上对应物品才能通关", -1, true, 170);
  948. GuideController.TryGuide(_ui.m_comListType1.m_listType, ConstGuideId.BUY_CLOTHING, 7, "按照指示就可以找到必需品啦", buyClothingIndex);
  949. GuideController.TryGuide(_ui.m_comListType2.m_listType, ConstGuideId.BUY_CLOTHING, 8, "", buyClothingSubIndex);
  950. GuideController.TryGuide(_ui.m_partsList.m_list, ConstGuideId.BUY_CLOTHING, 9, "点击换上吧", buyClothingIdIndex, true, 170);
  951. GuideController.TryCompleteGuide(ConstGuideId.BUY_CLOTHING, 9);
  952. GuideController.TryGuide(_ui.m_btnHint, ConstGuideId.FIGHT_TIPS, 1, "这次换装需要获得别人的认可呢");
  953. GuideController.TryCompleteGuide(ConstGuideId.FIGHT_TIPS, 1);
  954. }
  955. }
  956. }