StoryChapterView.cs 24 KB

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