DressUpFightView.cs 43 KB

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