StoryChapterView.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. using FairyGUI;
  2. using UI.CommonGame;
  3. using UI.Main;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. using System.Collections;
  7. using ET;
  8. namespace GFGGame
  9. {
  10. public class StoryChapterView : BaseView
  11. {
  12. private UI_StoryChapterUI _ui;
  13. private int _chapterID;
  14. private GComponent _compChapter;
  15. private ValueBarController _valueBarController;
  16. private GObject _unPasslevelItem;
  17. private GObject _endLevelItem;
  18. private EffectUI _effectUI1;
  19. private EffectUI _effectUI2;
  20. private GComponent _comEff;
  21. private GComponent _effFirst;
  22. //当前章节索引
  23. private int newIndex;
  24. //y轴移动索引
  25. private float indexY;
  26. private GameObject gamey;
  27. //特效类型数组,这里后面可以二维数组,放向左和向右的
  28. private string[] effArray = new string[2]{ "ZJ_JuQing","ZJ_ZD" };
  29. private int currentDifficulty;
  30. public override void Dispose()
  31. {
  32. EffectUIPool.Recycle(_effectUI1);
  33. _effectUI1 = null;
  34. EffectUIPool.Recycle(_effectUI2);
  35. _effectUI2 = null;
  36. if (_comEff != null)
  37. {
  38. _comEff.RemoveFromParent();
  39. _comEff.Dispose();
  40. }
  41. if (_effFirst != null)
  42. {
  43. _effFirst.RemoveFromParent();
  44. _effFirst.Dispose();
  45. }
  46. if (_valueBarController != null)
  47. {
  48. _valueBarController.Dispose();
  49. _valueBarController = null;
  50. }
  51. if (_ui != null)
  52. {
  53. _ui.Dispose();
  54. _ui = null;
  55. }
  56. base.Dispose();
  57. }
  58. protected override void Init()
  59. {
  60. base.Init();
  61. _ui = UI_StoryChapterUI.Create();
  62. viewCom = _ui.target;
  63. isfullScreen = true;
  64. isReturnView = false;
  65. }
  66. protected override void OnInit()
  67. {
  68. base.OnInit();
  69. _valueBarController = new ValueBarController(_ui.m_valueBar);
  70. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  71. _ui.m_btnHome.onClick.Add(OnClickBtnHome);
  72. _ui.m_switchChapter.onClick.Add(OnClickSwitchBack);
  73. _ui.m_chapter.m_compChapterScroll.m_imgBegin.onClick.Add(OnClickNext);
  74. _ui.m_bonusBox1.target.onClick.Add(() =>
  75. {
  76. OnClickBonusBox(_ui.m_bonusBox1, 0);
  77. });
  78. _ui.m_bonusBox2.target.onClick.Add(() =>
  79. {
  80. OnClickBonusBox(_ui.m_bonusBox2, 1);
  81. });
  82. _ui.m_bonusBox3.target.onClick.Add(() =>
  83. {
  84. OnClickBonusBox(_ui.m_bonusBox3, 2);
  85. });
  86. _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zxian_bg3");
  87. _comEff = new GComponent();
  88. _comEff = UIPackage.CreateObject(UI_MainUI.PACKAGE_NAME, "ComEff").asCom;
  89. _effectUI1 = EffectUIPool.CreateEffectUI(_comEff.GetChild("holder").asGraph, "ui_gk", "ui_gk_sg");
  90. _effFirst = new GComponent();
  91. _effFirst = UIPackage.CreateObject(UI_MainUI.PACKAGE_NAME, "ComEff").asCom;
  92. }
  93. protected override void AddEventListener()
  94. {
  95. EventAgent.AddEventListener(ConstMessage.NOTICE_MAINSTORY_BOXBONUS_STATE, UpdateBonusBox);
  96. }
  97. protected override void OnShown()
  98. {
  99. base.OnShown();
  100. _ui.target.touchable = false;
  101. MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
  102. if ((this.viewData as object[]) != null)
  103. {
  104. _chapterID = (int)(this.viewData as object[])[0];
  105. currentDifficulty = (int)(this.viewData as object[])[1];
  106. }
  107. else
  108. {
  109. _chapterID = (int)this.viewData;
  110. }
  111. MainStoryDataManager.currentChapterCfgId = _chapterID;
  112. //由于这里会切换特效,所以切换界面时进行清空
  113. EffectUIPool.Recycle(_effectUI2);
  114. _effectUI2 = null;
  115. if (_effFirst != null)
  116. {
  117. _effFirst.RemoveFromParent();
  118. }
  119. StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
  120. newIndex = StoryUtil.GetChapterOrder(chapterCfg.id);
  121. indexY = 115.0f * (float)StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id).Count;
  122. gamey = GameObject.Find("Stage/GRoot/GComponent/StoryChapterUI/CompChapter/Container/Container");
  123. Timers.inst.StartCoroutine(InitChapter());
  124. Timers.inst.Add(0.5f,1,SetContainerY);
  125. _valueBarController.OnShown();
  126. _ui.target.touchable = true;
  127. Timers.inst.AddUpdate(CheckGuide);
  128. int chapterNum = StoryChapterCfgArray.Instance.GetCfgsBysubType(currentDifficulty).Count;
  129. if (MainStoryDataManager.CurrentChapterOrder == chapterNum)
  130. {
  131. _ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = false;
  132. }
  133. else
  134. {
  135. _ui.m_chapter.m_compChapterScroll.m_imgBegin.visible = true;
  136. }
  137. }
  138. protected override void OnHide()
  139. {
  140. base.OnHide();
  141. _unPasslevelItem = null;
  142. _endLevelItem = null;
  143. // _ui.m_chapter.RemoveChildren(0, 0, true);
  144. _valueBarController.OnHide();
  145. Timers.inst.Remove(SetContainerY);
  146. Timers.inst.Remove(CheckGuide);
  147. }
  148. protected override void RemoveEventListener()
  149. {
  150. base.RemoveEventListener();
  151. EventAgent.RemoveEventListener(ConstMessage.NOTICE_MAINSTORY_BOXBONUS_STATE, UpdateBonusBox);
  152. }
  153. private void OnClickBtnBack()
  154. {
  155. //ViewManager.GoBackFrom(typeof(StoryChapterView).FullName);
  156. GameController.GoBackToMainView();
  157. }
  158. private void OnClickSwitchBack()
  159. {
  160. Timers.inst.Remove(SetContainerY);
  161. ViewManager.Show<StoryChapterListView>(new object[] { currentDifficulty , newIndex }, new object[] { typeof(StoryChapterView).FullName, this.viewData });
  162. }
  163. private void OnClickBtnHome()
  164. {
  165. GameController.GoBackToMainView();
  166. }
  167. private void OnClickNext()
  168. {
  169. if (MainStoryDataManager.CheckChapterUnlock(_chapterID+1))
  170. {
  171. Timers.inst.Remove(SetContainerY);
  172. ViewManager.Show<StoryChapterView>(new object[] { _chapterID+1, currentDifficulty });
  173. }
  174. else
  175. {
  176. StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID + 1);
  177. if (GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) < chapterCfg.lvl)
  178. {
  179. PromptController.Instance.ShowFloatTextPrompt(string.Format("角色等级达到%d级开启",chapterCfg.lvl));
  180. }
  181. else
  182. {
  183. PromptController.Instance.ShowFloatTextPrompt("需通关前置关卡");
  184. }
  185. }
  186. }
  187. private IEnumerator InitChapter()
  188. {
  189. StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
  190. _ui.m_txtChapterName0.text = chapterCfg.name.Length > 0 ? chapterCfg.name[0].ToString() : "";
  191. _ui.m_txtChapterName1.text = chapterCfg.name.Length > 1 ? chapterCfg.name[1].ToString() : "";
  192. _ui.m_txtChapterName2.text = chapterCfg.name.Length > 2 ? chapterCfg.name[2].ToString() : "";
  193. _ui.m_txtChapterName3.text = chapterCfg.name.Length > 3 ? chapterCfg.name[3].ToString() : "";
  194. _ui.m_txtChapterName4.text = chapterCfg.name.Length > 4 ? chapterCfg.name[4].ToString() : "";
  195. int order = StoryUtil.GetChapterOrder(chapterCfg.id);
  196. _ui.m_txtChapter.text = order < 10 ? "0" + order : order.ToString();
  197. int starCountChapter = InstanceZonesDataManager.GetChapterStarCount(_chapterID, chapterCfg.type, chapterCfg.subType);
  198. _ui.m_txtStarCount.text = "" + starCountChapter + "/" + chapterCfg.bonusStar3;
  199. UpdateBonusBoxName(_ui.m_bonusBox1, "" + chapterCfg.bonusStar1);
  200. UpdateBonusBoxName(_ui.m_bonusBox2, "" + chapterCfg.bonusStar2);
  201. UpdateBonusBoxName(_ui.m_bonusBox3, "" + chapterCfg.bonusStar3);
  202. UpdateBonusBox();
  203. var list = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
  204. int endLevel = 0;
  205. int UnlockCount = 0;
  206. _compChapter = _ui.m_chapter.m_compChapterScroll.target;
  207. float starPosY = _ui.m_chapter.m_compChapterScroll.m_imgBegin.y;
  208. int lineGap = 4500 / list.Count;
  209. _comEff.visible = false;
  210. _effFirst.visible = false;
  211. for (int i = 0; i < 20; i++)
  212. {
  213. GObject obj = _ui.m_chapter.m_compChapterScroll.target.GetChild("g" + (19 - i + 1));
  214. obj.SetPosition(obj.x, starPosY - lineGap * i - 300, 0); ;
  215. StoryLevelCfg levelCfg = i < list.Count ? list[i] : null;
  216. UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(obj);
  217. levelItem.m_fightBg.visible = true;
  218. levelItem.m_loaDialogBg.visible = true;
  219. if (levelCfg != null && MainStoryDataManager.CheckLevelUnlock(levelCfg.id))
  220. {
  221. UnlockCount++;
  222. levelItem.target.data = levelCfg.id;
  223. levelItem.target.visible = true;
  224. levelItem.target.onClick.Clear();
  225. levelItem.target.onClick.Add(OnClickLevelItem);
  226. string showId = StoryUtil.GetChapterOrder(_chapterID) + "-" + levelCfg.order;
  227. levelItem.m_txtDialogOrder.text = showId;
  228. levelItem.m_txtFightOrder.text = showId;
  229. if (levelCfg.fightID.Length > 0)
  230. {
  231. levelItem.m_c1.selectedIndex = 1;
  232. int score = InstanceZonesDataManager.GetScoreHighest(levelCfg.id);
  233. if (score <= 0)
  234. {
  235. levelItem.m_flower.target.visible = false;
  236. }
  237. else
  238. {
  239. levelItem.m_flower.target.visible = true;
  240. int starCount = InstanceZonesDataManager.GetStarCountHistory(levelCfg.id);
  241. StoryUtil.UpdateStar(starCount, levelItem.m_flower.target);
  242. }
  243. }
  244. else
  245. {
  246. levelItem.m_c1.selectedIndex = 0;
  247. levelItem.m_flower.target.visible = false;
  248. levelItem.m_txtName.text = levelCfg.name;
  249. levelItem.m_comDialogBg.m_loabg.url = ResPathUtil.GetBgImgPath(chapterCfg.bgRes);
  250. levelItem.m_comDialogBg.m_loaIcon.url = ResPathUtil.GetChapterGuideIconPath(chapterCfg.bgRes);
  251. levelItem.m_comDialogBg.m_c1.selectedIndex = Random.Range(0, 10);
  252. }
  253. //根据困难程度选择显示图片
  254. if (currentDifficulty == 1)
  255. {
  256. levelItem.m_loaDialogBg.url = "ui://Main/zxian_btn_jq_jy";
  257. levelItem.m_fightBg.url = "ui://Main/zxian_btn_zd_jy";
  258. levelItem.m_txtFightOrder.text = string.Format("{0}", StringUtil.GetColorText(showId.ToString(), "#E3F8FF"));
  259. levelItem.m_fightIconA.alpha = 0;
  260. levelItem.m_fightIconB.alpha = 0;
  261. _ui.m_txtBg.url = "ui://Main/zxian_chapter_dec_jy";
  262. _ui.m_txtChapterName0.strokeColor = new Color(0.592f, 0.773f, 0.961f, 1.000f);
  263. _ui.m_txtChapterName1.strokeColor = new Color(0.592f, 0.773f, 0.961f, 1.000f);
  264. _ui.m_txtChapterName2.strokeColor = new Color(0.592f, 0.773f, 0.961f, 1.000f);
  265. _ui.m_txtChapterName3.strokeColor = new Color(0.592f, 0.773f, 0.961f, 1.000f);
  266. _ui.m_txtChapterName4.strokeColor = new Color(0.592f, 0.773f, 0.961f, 1.000f);
  267. _ui.m_txtChapter.strokeColor = new Color(0.592f, 0.773f, 0.961f, 1.000f);
  268. }
  269. else
  270. {
  271. levelItem.m_loaDialogBg.url = "ui://Main/zxian_btn_jq";
  272. levelItem.m_fightBg.url = "ui://Main/zxian_btn_zd";
  273. levelItem.m_txtFightOrder.text = string.Format("{0}", StringUtil.GetColorText(showId.ToString(), "#FFEABF"));
  274. levelItem.m_fightIconA.alpha = 0;
  275. levelItem.m_fightIconB.alpha = 0;
  276. _ui.m_txtBg.url = "ui://Main/zxian_chapter_dec";
  277. _ui.m_txtChapterName0.strokeColor = new Color(1.000f, 0.686f, 0.318f, 1.000f);
  278. _ui.m_txtChapterName1.strokeColor = new Color(1.000f, 0.686f, 0.318f, 1.000f);
  279. _ui.m_txtChapterName2.strokeColor = new Color(1.000f, 0.686f, 0.318f, 1.000f);
  280. _ui.m_txtChapterName3.strokeColor = new Color(1.000f, 0.686f, 0.318f, 1.000f);
  281. _ui.m_txtChapterName4.strokeColor = new Color(1.000f, 0.686f, 0.318f, 1.000f);
  282. _ui.m_txtChapter.strokeColor = new Color(1.000f, 0.686f, 0.318f, 1.000f);
  283. }
  284. levelItem.m_holder.visible = !InstanceZonesDataManager.CheckLevelPass(levelCfg.id);
  285. if (!InstanceZonesDataManager.CheckLevelPass(levelCfg.id))
  286. {
  287. //设置为解锁关卡
  288. MainStoryDataManager.currentLevelCfgId = levelCfg.id;
  289. _unPasslevelItem = levelItem.target;
  290. levelItem.target.AddChild(_comEff);
  291. _comEff.visible = true;
  292. //设置解锁特效
  293. //string effName;
  294. //if ( currentDifficulty == 0 )
  295. //{
  296. // effName = effArray[levelItem.m_c1.selectedIndex];
  297. //}
  298. //else
  299. //{
  300. // effName = effArray[levelItem.m_c1.selectedIndex] + "_Blue";
  301. //}
  302. //_effectUI2 = EffectUIPool.CreateEffectUI(_effFirst.GetChild("holder").asGraph, "ui_zj", effName);
  303. //levelItem.target.AddChild(_effFirst);
  304. //levelItem.m_fightBg.visible = false;
  305. //levelItem.m_loaDialogBg.visible = false;
  306. //_effFirst.visible = true;
  307. //Timers.inst.Add(1.7f, 1, HideEffect, obj);
  308. }
  309. if (levelCfg.order > endLevel)
  310. {
  311. endLevel = levelCfg.order;
  312. _endLevelItem = levelItem.target;
  313. }
  314. }
  315. else
  316. {
  317. levelItem.target.visible = false;
  318. }
  319. UI_CompStoryLevelItem.ProxyEnd();
  320. }
  321. yield return new WaitForEndOfFrame();
  322. _ui.m_chapter.m_compChapterScroll.target.y =Mathf.Max(1 , _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height);
  323. gamey.transform.position = new Vector3(0, indexY, 0);
  324. }
  325. private void SetContainerY(object param = null)
  326. {
  327. _ui.m_chapter.m_compChapterScroll.target.y = Mathf.Max(0, _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height - 1);
  328. }
  329. private void HideEffect(object param = null)
  330. {
  331. //UI_CompStoryLevelItem.Proxy(param as GObject).m_fightBg.visible = true;
  332. _comEff.visible = true;
  333. //_effFirst.visible = false;
  334. }
  335. private void OnClickLevelItem(EventContext context)
  336. {
  337. UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(context.sender as GObject);
  338. int levelCfgId = (int)levelItem.target.data;
  339. UI_CompStoryLevelItem.ProxyEnd();
  340. StoryController.ShowLevelView(levelCfgId);
  341. TryCompleteGuide();
  342. }
  343. private void UpdateBonusBoxName(UI_CompBonusBox bonusBox, string name)
  344. {
  345. bonusBox.m_txtName.text = name;
  346. }
  347. private void UpdateBonusBox()
  348. {
  349. UpdateBonusBoxStatus(_ui.m_bonusBox1, 0);
  350. UpdateBonusBoxStatus(_ui.m_bonusBox2, 1);
  351. UpdateBonusBoxStatus(_ui.m_bonusBox3, 2);
  352. }
  353. private void UpdateBonusBoxStatus(UI_CompBonusBox bonusBox, int index)
  354. {
  355. int status = MainStoryDataManager.GetChapterBonusStatus(MainStoryDataManager.currentChapterCfgId, index);
  356. bonusBox.m_iconActive.visible = status == ConstBonusStatus.CAN_GET;
  357. // bonusBox.m_ComRewardEffect.visible = status == ConstBonusStatus.CAN_GET;
  358. if (status == ConstBonusStatus.GOT)
  359. {
  360. bonusBox.m_icon.url = "ui://Main/zxian_gift_get";
  361. }
  362. else
  363. {
  364. bonusBox.m_icon.url = "ui://Main/zxian_gift_unget";
  365. }
  366. bonusBox.target.data = status;
  367. }
  368. private async void OnClickBonusBox(UI_CompBonusBox bonusBox, int index)
  369. {
  370. int status = (int)bonusBox.target.data;
  371. if (status == ConstBonusStatus.CAN_GET)
  372. {
  373. bool got = await MainStorySProxy.GetMainStoryBoxBonus(MainStoryDataManager.currentChapterCfgId, index);
  374. if (got)
  375. {
  376. List<ItemData> bonusList = MainStoryDataManager.GetChapterBonus(MainStoryDataManager.currentChapterCfgId, index);
  377. if (bonusList != null && bonusList.Count > 0)
  378. {
  379. BonusController.TryShowBonusList(bonusList);
  380. }
  381. UpdateBonusBoxStatus(bonusBox, index);
  382. }
  383. }
  384. // else if (status == ConstBonusStatus.GOT)
  385. // {
  386. // PromptController.Instance.ShowFloatTextPrompt("这个宝箱已经被领取过了");
  387. // }
  388. else
  389. {
  390. List<ItemData> rewards = StoryBonusDataCache.GetChapterBonusList(_chapterID, index);
  391. int star = StoryBonusDataCache.GetChapterBonusStar(_chapterID, index);
  392. ViewManager.Show<RewardPreView>(new object[] { rewards, "宝箱奖励", string.Format("本章达成{0}星可领取", star) });
  393. // PromptController.Instance.ShowFloatTextPrompt("关卡总分不足,继续加油吧。");
  394. }
  395. }
  396. private void CheckGuide(object param)
  397. {
  398. if (GuideDataManager.IsGuideFinish(ConstGuideId.START_FIGHT) <= 0
  399. || GuideDataManager.IsGuideFinish(ConstGuideId.FREEDOM_DRESS) <= 0
  400. || GuideDataManager.IsGuideFinish(ConstGuideId.ENTER_CHAPTER) <= 0
  401. || GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0
  402. || GuideDataManager.IsGuideFinish(ConstGuideId.UP_CARD_LV) <= 0
  403. || GuideDataManager.IsGuideFinish(ConstGuideId.ENTER_CHAPTER_1) <= 0
  404. || GuideDataManager.IsGuideFinish(ConstGuideId.ENTER_CHAPTER_2) <= 0
  405. //|| GuideDataManager.IsGuideFinish(ConstGuideId.ENTER_CHAPTER_3) <= 0
  406. || GuideDataManager.IsGuideFinish(ConstGuideId.ENTER_CHAPTER_4) <= 0
  407. || GuideDataManager.IsGuideFinish(ConstGuideId.ENTER_CHAPTER_5) <= 0
  408. || GuideDataManager.IsGuideFinish(ConstGuideId.UP_CARD_STAR) <= 0
  409. || GuideDataManager.IsGuideFinish(ConstGuideId.ARENA_OPEN) <= 0)
  410. //|| GuideDataManager.IsGuideFinish(ConstGuideId.CLOTHING_DECOMPOSE) <= 0)
  411. {
  412. UpdateToCheckGuide(null);
  413. }
  414. else
  415. {
  416. Timers.inst.Remove(CheckGuide);
  417. }
  418. }
  419. protected override void UpdateToCheckGuide(object param)
  420. {
  421. if (!ViewManager.CheckIsTopView(this.viewCom)) return;
  422. GComponent unPasslevelCom = _unPasslevelItem == null ? null : _unPasslevelItem.asCom;
  423. bool isGuide0 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.START_FIGHT, 1, "尝试换上一套衣服吧。");
  424. bool isGuide1 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.FREEDOM_DRESS, 1, "获得的服饰随时可以查看和试穿。");
  425. bool isGuide2 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.ENTER_CHAPTER, 5, "来继续我们的旅程吧。");
  426. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER, 5);
  427. bool isGuide3 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.ENTER_CHAPTER_1, 4, "来继续我们的旅程吧。");
  428. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_1, 4);
  429. bool isGuide4 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.BUY_CLOTHING, 1, "衣服被弄脏了,到机场更衣室换身衣服吧。");
  430. bool isGuide5 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.UP_CARD_LV, 1, "点击返回主界面。");
  431. //bool isGuide6 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.CLOTHING_DECOMPOSE, 1, "点击返回主界面。");
  432. bool isGuide7 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.ENTER_CHAPTER_2, 4, "来继续我们的旅程吧。");
  433. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_2, 4);
  434. //bool isGuide8 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.ENTER_CHAPTER_3, 3, "来继续我们的旅程吧。");
  435. //GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_3, 3);
  436. bool isGuide10 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.ENTER_CHAPTER_4, 4, "来继续我们的旅程吧。");
  437. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_4, 4);
  438. bool isGuide11 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.ENTER_CHAPTER_5, 4, "来继续我们的旅程吧。");
  439. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_5, 4);
  440. bool isGuide9 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.UP_CARD_STAR, 1, "点击返回主界面。");
  441. bool isGuide12 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.ARENA_OPEN, 1, "点击返回主界面。");
  442. //&& !isGuide6 && !isGuide8
  443. _ui.m_chapter.target.scrollPane.touchEffect = !isGuide0 && !isGuide1 && !isGuide2 && !isGuide3 && !isGuide4 && !isGuide5 && !isGuide7 && !isGuide9 && !isGuide10;
  444. }
  445. protected override void TryCompleteGuide()
  446. {
  447. base.TryCompleteGuide();
  448. // GuideCfg cfg = GuideCfgArray.Instance.GetCfg(ConstGuideId.ENTER_CHAPTER);
  449. GuideController.TryCompleteGuideIndex(ConstGuideId.ENTER_CHAPTER, 5);
  450. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER, 5);
  451. // GuideCfg cfg1 = GuideCfgArray.Instance.GetCfg(ConstGuideId.ENTER_CHAPTER_1);
  452. GuideController.TryCompleteGuideIndex(ConstGuideId.ENTER_CHAPTER_1, 4);
  453. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_1, 4);
  454. // GuideCfg cfg2 = GuideCfgArray.Instance.GetCfg(ConstGuideId.ENTER_CHAPTER_2);
  455. GuideController.TryCompleteGuideIndex(ConstGuideId.ENTER_CHAPTER_2, 4);
  456. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_2, 4);
  457. // GuideCfg cfg3 = GuideCfgArray.Instance.GetCfg(ConstGuideId.ENTER_CHAPTER_3);
  458. //GuideController.TryCompleteGuideIndex(ConstGuideId.ENTER_CHAPTER_3, 3);
  459. //GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_3, 3);
  460. // GuideCfg cfg4 = GuideCfgArray.Instance.GetCfg(ConstGuideId.ENTER_CHAPTER_4);
  461. GuideController.TryCompleteGuideIndex(ConstGuideId.ENTER_CHAPTER_4, 4);
  462. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_4, 4);
  463. // GuideCfg cfg5 = GuideCfgArray.Instance.GetCfg(ConstGuideId.ENTER_CHAPTER_5);
  464. GuideController.TryCompleteGuideIndex(ConstGuideId.ENTER_CHAPTER_5, 4);
  465. GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_5, 4);
  466. }
  467. }
  468. }