TutorialManager.cs 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.UI;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. public class TutorialManager : Regist
  7. {
  8. #region Config
  9. public static bool PayExempt
  10. {
  11. get
  12. {
  13. if (PayExempt_)
  14. {
  15. return true;
  16. }
  17. else
  18. {
  19. if (PayExemptAmt > 0)
  20. {
  21. PayExemptAmt--;
  22. return true;
  23. }
  24. else
  25. {
  26. return false;
  27. }
  28. }
  29. }
  30. set { PayExempt_ = value; }
  31. }
  32. public static bool ConnectExempt
  33. {
  34. get
  35. {
  36. if (ConnectExempt_)
  37. {
  38. return true;
  39. }
  40. else
  41. {
  42. if (ConnectExemptAmt > 0)
  43. {
  44. ConnectExemptAmt--;
  45. return true;
  46. }
  47. else
  48. {
  49. return false;
  50. }
  51. }
  52. }
  53. set { ConnectExempt_ = value; }
  54. }
  55. public static bool PayExempt_;
  56. public static bool ConnectExempt_;
  57. public static int PayExemptAmt;
  58. public static int ConnectExemptAmt;
  59. public static int MemoryMinigameTutorialLevel = 18;
  60. public static int VisitTutorialLevel = 8;
  61. public static int DressroomTutorialLevel = 13;
  62. public static int FindMinigameTutorialLevel = 22;
  63. public static int PlazaRoomTutorialLevel = 28;
  64. public static int SetNicknameTutorialIndex = 7;
  65. public static int MinFlowerForFindGame = 2;
  66. public static bool NewplayerTutorial;
  67. public static bool MemoryMinigameTutorial;
  68. public static bool VisitTutorial;
  69. public static bool DressroomTutorial;
  70. public static bool FindMinigameTutorial;
  71. public static bool PlazaRoomTutorial;
  72. public static bool memoryMinigameTutorial;
  73. public static bool visitTutorial;
  74. public static bool dressroomTutorial;
  75. public static bool findMinigameTutorial;
  76. public static bool plazaRoomTutorial;
  77. public static int NewplayerTutorialIndex;
  78. public static int MemoryMinigameTutorialIndex;
  79. public static int VisitTutorialIndex;
  80. public static int DressroomTutorialIndex;
  81. public static int FindMinigameTutorialIndex;
  82. public static int PlazaRoomTutorialIndex;
  83. #endregion
  84. public override void InstantiatePrefabs()
  85. {
  86. if (NewplayerTutorial)
  87. {
  88. ResourceManager.Get(ResourceLabel.Tutorial, Folder.Scene, true, transform, false, ObjType.Tutorial).AddScript<Tutorial>();
  89. }
  90. }
  91. public override void ThirdInit()
  92. {
  93. ResourceManager.Get<Image>(ObjectLabel.N_Mask).material = Lib.UIMaskMat;
  94. Tutorial.Arrow = ResourceManager.Get(ObjectLabel.N_Arrow);
  95. Tutorial.Material = ResourceManager.Get<Image>(ObjectLabel.N_Mask).material;
  96. if (NewplayerTutorial)
  97. {
  98. ResourceManager.Get(TutorialLabel.TutorialMask).AddScript<SceneMask>();
  99. Vector3 playerDisplayScale = new Vector3(0.75f, 0.75f, 0.75f);
  100. Vector3 playerSelectScale = new Vector3(0.9f, 0.9f, 0.9f);
  101. ResourceManager.Get(TutorialLabel.Tutorial).CreateTweenSr(0, 1, 1f, true, true, Curve.EaseOutQuad, false, true).AlphaOnly = true;
  102. ResourceManager.Get(TutorialLabel.PlayerBk1).CreateTweenScale(playerDisplayScale, playerSelectScale, 1f, true, true, Curve.EaseOutQuad);
  103. ResourceManager.Get(TutorialLabel.PlayerBk2).CreateTweenScale(playerDisplayScale, playerSelectScale, 1f, true, true, Curve.EaseOutQuad);
  104. ResourceManager.Get(TutorialLabel.PlayerBk3).CreateTweenScale(playerDisplayScale, playerSelectScale, 1f, true, true, Curve.EaseOutQuad);
  105. ResourceManager.Get(TutorialLabel.TutorialMask).CreateTweenSr(0, 180 / 255f, 0.25f, true, true, Curve.EaseOutQuad);
  106. if (NewplayerTutorialIndex == 1)
  107. {
  108. ResourceManager.Get(ObjectLabel.C_MiniGame).TweenBacCG();
  109. ChoseCharacter();
  110. }
  111. else if (NewplayerTutorialIndex == SetNicknameTutorialIndex)
  112. {
  113. SetNickname();
  114. }
  115. else if (NewplayerTutorialIndex == 2)
  116. {
  117. ClickEnterMinigame();
  118. }
  119. else if (NewplayerTutorialIndex == 4)
  120. {
  121. ResourceManager.Get(ObjectLabel.C_MiniGame).TweenBacCG();
  122. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  123. ResourceManager.SetActive(TutorialLabel.Tutorial, true);
  124. ResourceManager.SetActive(TutorialLabel.TutorialMask, true);
  125. ResourceManager.SetActive(TutorialLabel.TutorialCollider, true);
  126. Garden.Instance.TutorialToRegular();
  127. UIManager.Instance.TutorialToRegular();
  128. Transform tra = GardenManager.SlotList[0].transform;
  129. Tutorial.HightScene(0.1f, 0.075f, tra.FindChild(SlotLabel.SlotArrow), tra);
  130. }
  131. else if (NewplayerTutorialIndex == 6)
  132. {
  133. ResourceManager.Get(ObjectLabel.C_MiniGame).TweenBacCG();
  134. Garden.Instance.TutorialToRegular();
  135. UIManager.Instance.TutorialToRegular();
  136. ClickManagePanel();
  137. }
  138. }
  139. }
  140. public static void EndChoseCharacter()
  141. {
  142. StaticsManager.GetInstance().TutoComplete("EndChoseCharacter");
  143. Destroy(ResourceManager.Get(TutorialLabel.PlayerBk1).gameObject);
  144. Destroy(ResourceManager.Get(TutorialLabel.PlayerBk2).gameObject);
  145. Destroy(ResourceManager.Get(TutorialLabel.PlayerBk3).gameObject);
  146. SetNickname();
  147. }
  148. public static void EndSetNickname()
  149. {
  150. NickNameManager.CloseNickNameSettingPanel();
  151. NickNameManager.OnSetNickNameSucceed = null;
  152. StaticsManager.GetInstance().TutoComplete("EndSetNickname");
  153. ClickEnterMinigame();
  154. }
  155. public static void EndClickEnterMinigame()
  156. {
  157. StaticsManager.GetInstance().TutoComplete("EndClickEnterMinigame");
  158. Tutorial.HightDisable();
  159. PlayPunchMinigame();
  160. }
  161. public static void EndPlayPunchMinigame()
  162. {
  163. StaticsManager.GetInstance().TutoComplete("EndPlayPunchMinigame");
  164. Tutorial.HightDisable();
  165. ResourceManager.SetActive(ObjectLabel.D_Quit, true);
  166. ClickSlot();
  167. }
  168. public static void EndClickSlot()
  169. {
  170. StaticsManager.GetInstance().TutoComplete("EndClickSlot");
  171. Tutorial.HightDisable();
  172. PlantFlower();
  173. }
  174. public static void EndPlantFlower()
  175. {
  176. StaticsManager.GetInstance().TutoComplete("EndPlantFlower");
  177. ClickManagePanel();
  178. }
  179. public static void EndClickManagePanel()
  180. {
  181. StaticsManager.GetInstance().TutoComplete("EndClickManagePanel");
  182. Tutorial.HightDisable();
  183. OpenUnlockPanel();
  184. }
  185. public static void EndOpenUnlockPanel()
  186. {
  187. StaticsManager.GetInstance().TutoComplete("EndOpenUnlockPanel");
  188. Tutorial.HightDisable(0, true);
  189. ClickConfirmButton();
  190. }
  191. public static void EndClickConfirmButton()
  192. {
  193. StaticsManager.GetInstance().TutoComplete("EndClickConfirmButton");
  194. Tutorial.HightDisable(0, true);
  195. UseBigSkill();
  196. }
  197. public static void EndUseBigSkill()
  198. {
  199. Tutorial.HightDisable(0, false);
  200. }
  201. public static void EndShowTip()
  202. {
  203. StaticsManager.GetInstance().TutoComplete("EndShowTip");
  204. NewplayerTutorial = false;
  205. AudioManager.PlayClip(AudioLabel.Close);
  206. AchieveManager.UpdateHint();
  207. Tutorial.HightDisable();
  208. ResourceManager.Get(ObjectLabel.F_TipBK).TweenBacCG();
  209. ResourceManager.SetActive(ObjectLabel.F_TipBtn, false);
  210. ResourceManager.SetActive(TutorialLabel.Tutorial, false);
  211. ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
  212. ResourceManager.Get(ObjectLabel.C_MiniGame).TweenForCG();
  213. PlayerManager.Player.SetAllCollider(true);
  214. PayExemptAmt = 0;
  215. ConnectExempt = false;
  216. }
  217. public static void ChoseCharacter()
  218. {
  219. NewplayerTutorialIndex = 1;
  220. PlayerManager.PlayerPink.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
  221. PlayerManager.PlayerBlond.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
  222. PlayerManager.PlayerBrown.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
  223. ResourceManager.Get(TutorialLabel.PlayerBk2).TweenForScale();
  224. PlayerManager.PlayerBlond.TweenForScale();
  225. ResourceManager.SetActive(TutorialLabel.PlayerBk1, true);
  226. ResourceManager.SetActive(TutorialLabel.PlayerBk2, true);
  227. ResourceManager.SetActive(TutorialLabel.PlayerBk3, true);
  228. ResourceManager.SetActive(TutorialLabel.TutorialMask, true);
  229. ResourceManager.SetActive(TutorialLabel.TutorialCollider, true);
  230. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  231. ResourceManager.SetActive(ObjectLabel.N_Confirm, true);
  232. ResourceManager.AddButtonEventOnetime
  233. (
  234. ObjectLabel.N_Confirm,
  235. () =>
  236. {
  237. if (PlayerManager.SeleTra == PlayerManager.PlayerPink)
  238. {
  239. PlayerManager.DressData.Add("脑壳3");
  240. PlayerManager.DressData.Add("裙子3");
  241. PlayerManager.DressData.Add("鞋子3");
  242. PlayerManager.DressData.Add("头饰品3");
  243. PlayerManager.DressData.Add("上衣3");
  244. PlayerManager.DressData.Add("眼睛3");
  245. PlayerManager.DressData.Add("嘴巴3");
  246. PlayerManager.DressData.Add("Empty");
  247. PlayerManager.DressData.Add("Empty");
  248. PlayerManager.DressData.Add("短袖1左");
  249. PlayerManager.DressData.Add("Empty");
  250. PlayerManager.DressData.Add("短袖1右");
  251. }
  252. else if (PlayerManager.SeleTra == PlayerManager.PlayerBlond)
  253. {
  254. PlayerManager.DressData.Add("脑壳1");
  255. PlayerManager.DressData.Add("裙子1");
  256. PlayerManager.DressData.Add("鞋子1");
  257. PlayerManager.DressData.Add("头饰品1");
  258. PlayerManager.DressData.Add("上衣1");
  259. PlayerManager.DressData.Add("眼睛1");
  260. PlayerManager.DressData.Add("嘴巴1");
  261. PlayerManager.DressData.Add("Empty");
  262. PlayerManager.DressData.Add("Empty");
  263. PlayerManager.DressData.Add("短袖2左");
  264. PlayerManager.DressData.Add("Empty");
  265. PlayerManager.DressData.Add("短袖2右");
  266. }
  267. else if (PlayerManager.SeleTra == PlayerManager.PlayerBrown)
  268. {
  269. PlayerManager.DressData.Add("脑壳2");
  270. PlayerManager.DressData.Add("裙子2");
  271. PlayerManager.DressData.Add("鞋子2");
  272. PlayerManager.DressData.Add("头饰品2");
  273. PlayerManager.DressData.Add("上衣2");
  274. PlayerManager.DressData.Add("眼睛2");
  275. PlayerManager.DressData.Add("嘴巴2");
  276. PlayerManager.DressData.Add("Empty");
  277. PlayerManager.DressData.Add("Empty");
  278. PlayerManager.DressData.Add("短袖2左");
  279. PlayerManager.DressData.Add("Empty");
  280. PlayerManager.DressData.Add("短袖2右");
  281. }
  282. foreach (var str in PlayerManager.DressData)
  283. {
  284. if (!PlayerManager.CloseIDDic.ContainsKey(str))
  285. {
  286. continue;
  287. }
  288. int id = PlayerManager.CloseIDDic[str];
  289. PlayerManager.CloseItemDic[id].Unlock();
  290. PlayerManager.BoughtCloseList.Add(id);
  291. }
  292. ConfigManager.SaveDress();
  293. Transform tra = PlayerManager.SeleTra;
  294. PlayerManager.Player = tra.GetComponent<Player>();
  295. tra.parent = null;
  296. ResourceManager.TraDic.Add(tra.name, tra);
  297. AudioManager.PlayClip(AudioLabel.ClickButton);
  298. if (PlayerManager.PlayerPink != PlayerManager.SeleTra)
  299. {
  300. PlayerManager.PlayerPink.GetComponentInChildren<Renderer>(true).CreateTweenRenderer(0, 0.25f, true, false, Curve.EaseOutQuad, false, true).StartForward();
  301. }
  302. if (PlayerManager.PlayerBlond != PlayerManager.SeleTra)
  303. {
  304. PlayerManager.PlayerBlond.GetComponentInChildren<Renderer>(true).CreateTweenRenderer(0, 0.25f, true, false, Curve.EaseOutQuad, false, true).StartForward();
  305. }
  306. if (PlayerManager.PlayerBrown != PlayerManager.SeleTra)
  307. {
  308. PlayerManager.PlayerBrown.GetComponentInChildren<Renderer>(true).CreateTweenRenderer(0, 0.25f, true, false, Curve.EaseOutQuad, false, true).StartForward();
  309. }
  310. ResourceManager.Get(TutorialLabel.PlayerBk1).SetCollider(false);
  311. ResourceManager.Get(TutorialLabel.PlayerBk2).SetCollider(false);
  312. ResourceManager.Get(TutorialLabel.PlayerBk3).SetCollider(false);
  313. tra.CreateTweenScale(ResourceManager.Get(GardenLabel.PlayerPosTra).localScale, 1f, true, true, Curve.EaseOutQuad);
  314. tra.CreateTweenVec3D(ResourceManager.Get(GardenLabel.PlayerPosTra).position, 1f, false, true, true, Curve.EaseOutQuad);
  315. tra.SetParent(ResourceManager.Get(GardenLabel.GardenNormal));
  316. tra.TweenForVec();
  317. tra.TweenForScale();
  318. ResourceManager.Get(ObjectLabel.N_Confirm).TweenBacCG();
  319. TweenRoot tween = ResourceManager.Get(TutorialLabel.Tutorial).TweenBacSr();
  320. tween.AddEventOnetime
  321. (
  322. EventType.BackwardFinish,
  323. () =>
  324. {
  325. EndChoseCharacter();
  326. }
  327. );
  328. }
  329. );
  330. }
  331. public static void SetNickname()
  332. {
  333. NewplayerTutorialIndex = SetNicknameTutorialIndex;
  334. NickNameManager.ShowNickNameSettingPanelFirstTime();
  335. NickNameManager.OnSetNickNameSucceed = EndSetNickname;
  336. }
  337. public static void ClickEnterMinigame()
  338. {
  339. NewplayerTutorialIndex = 2;
  340. Garden.Instance.TutorialToRegular();
  341. UIManager.Instance.TutorialToRegular();
  342. ResourceManager.Get(ObjectLabel.C_Group).TweenForCG();
  343. ResourceManager.Get(ObjectLabel.C_MiniGame).TweenReForCG();
  344. ResourceManager.SetActive(ObjectLabel.C_Coin, false);
  345. ResourceManager.SetActive(ObjectLabel.C_Group1, false);
  346. ResourceManager.SetActive(ObjectLabel.C_Group3, false);
  347. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  348. TweenRoot tween = ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
  349. tween.AddEventOnetime
  350. (
  351. EventType.ForwardFinish,
  352. () =>
  353. {
  354. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_MiniArrow0), ResourceManager.Get(ObjectLabel.C_MiniArrow1), ResourceManager.Get(ObjectLabel.C_MiniGame));
  355. }
  356. );
  357. ResourceManager.AddButtonEventOnetime
  358. (
  359. ObjectLabel.C_MiniGame,
  360. () =>
  361. {
  362. EndClickEnterMinigame();
  363. }
  364. );
  365. }
  366. public static void PlayPunchMinigame()
  367. {
  368. ResourceManager.Get(TutorialLabel.Tutorial).SetCollider(false);
  369. ResourceManager.SetActive(ObjectLabel.D_Quit, false);
  370. TweenRoot tween = ResourceManager.Get(ObjectLabel.D_MiniGame).GetTweenCG();
  371. tween.AddEventOnetime
  372. (
  373. EventType.ForwardFinish,
  374. () =>
  375. {
  376. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.D_BeginArrow0), ResourceManager.Get(ObjectLabel.D_BeginArrow1), ResourceManager.Get(ObjectLabel.D_Begin));
  377. }
  378. );
  379. ResourceManager.PushButtonEventOnetime
  380. (
  381. ObjectLabel.D_Begin,
  382. () =>
  383. {
  384. Tutorial.HightDisable();
  385. }
  386. );
  387. ResourceManager.AddButtonEventOnetime
  388. (
  389. ObjectLabel.Da_GetAward,
  390. () =>
  391. {
  392. EndPlayPunchMinigame();
  393. ResourceManager.Get(ObjectLabel.C_MiniGame).TweenBacCG();
  394. }
  395. );
  396. }
  397. public static void ClickSlot()
  398. {
  399. NewplayerTutorialIndex = 4;
  400. TweenRoot tween = ResourceManager.Get(ObjectLabel.D_MiniGame).GetTweenCG();
  401. tween.AddEventOnetime
  402. (
  403. EventType.BackwardFinish,
  404. () =>
  405. {
  406. ResourceManager.Get(TutorialLabel.Tutorial).SetCollider(true);
  407. ResourceManager.Get<SpriteRenderer>(TutorialLabel.TutorialMask).material.SetAlpha(MaterialLabel.DefaultMatColor, 1);
  408. ResourceManager.SetActive(TutorialLabel.TutorialMask, true);
  409. ResourceManager.SetActive(TutorialLabel.TutorialCollider, true);
  410. Transform tra = GardenManager.SlotList[0].transform;
  411. Tutorial.HightScene(0.1f, 0.075f, tra.FindChild(SlotLabel.SlotArrow), tra);
  412. }
  413. );
  414. }
  415. public static void PlantFlower()
  416. {
  417. TweenRoot tween = ResourceManager.Get(ObjectLabel.G_Flower).TweenForCG();
  418. tween.AddEventOnetime
  419. (
  420. EventType.ForwardFinish,
  421. () =>
  422. {
  423. Transform tra = ResourceManager.Get(ObjectLabel.G_RegularGrid).GetChild(0);
  424. Tutorial.HightScreen(tra.FindChild(FlowerItemLabel.Arrow0), tra);
  425. }
  426. );
  427. FlowerInfo flowerInfo = GardenManager.FlowerInfoDic[1];
  428. flowerInfo.Button.AddButtonEventOnetime
  429. (
  430. () =>
  431. {
  432. Tutorial.HightDisable(0, true);
  433. }
  434. );
  435. tween = ResourceManager.Get(ObjectLabel.H_FlowerCard).GetTweenCG();
  436. tween.AddEventOnetime
  437. (
  438. EventType.ForwardFinish,
  439. () =>
  440. {
  441. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.H_ArrowPos), ResourceManager.Get(ObjectLabel.H_Icon2));
  442. }
  443. );
  444. ResourceManager.AddButtonEventOnetime
  445. (
  446. ObjectLabel.H_Icon2,
  447. () =>
  448. {
  449. Tutorial.HightDisable(0, true);
  450. ResourceManager.Get(ObjectLabel.H_FlowerCard).TweenBacCG();
  451. }
  452. );
  453. tween = ResourceManager.Get(ObjectLabel.H_FlowerCard).GetTweenCG();
  454. tween.AddEventOnetime
  455. (
  456. EventType.BackwardFinish,
  457. () =>
  458. {
  459. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.G_Arrow0), ResourceManager.Get(ObjectLabel.G_Close));
  460. }
  461. );
  462. ResourceManager.AddButtonEventOnetime
  463. (
  464. ObjectLabel.G_Close,
  465. () =>
  466. {
  467. Tutorial.HightDisable();
  468. }
  469. );
  470. tween = ResourceManager.Get(ObjectLabel.G_Flower).GetTweenCG();
  471. tween.AddEventOnetime
  472. (
  473. EventType.BackwardFinish,
  474. () =>
  475. {
  476. EndPlantFlower();
  477. }
  478. );
  479. }
  480. public static void ClickManagePanel()
  481. {
  482. NewplayerTutorialIndex = 6;
  483. ResourceManager.SetActive(ObjectLabel.C_Coin, true);
  484. ResourceManager.SetActive(ObjectLabel.C_Group1, true);
  485. ResourceManager.SetActive(ObjectLabel.C_Group3, true);
  486. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  487. TweenRoot tween = ResourceManager.Get(ObjectLabel.C_Group).TweenForCG();
  488. tween.AddEventOnetime
  489. (
  490. EventType.ForwardFinish, () =>
  491. {
  492. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_ManageArrow0), ResourceManager.Get(ObjectLabel.C_Manage));
  493. }
  494. );
  495. ResourceManager.AddButtonEventOnetime
  496. (
  497. ObjectLabel.C_Manage,
  498. () =>
  499. {
  500. EndClickManagePanel();
  501. }
  502. );
  503. }
  504. public static void OpenUnlockPanel()
  505. {
  506. TweenRoot tween = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
  507. tween.AddEventOnetime
  508. (
  509. EventType.ForwardFinish,
  510. () =>
  511. {
  512. Transform tra = Manager.SkillDic["Ability1"].SkillItem;
  513. Tutorial.HightScreen(tra.FindChild(SkillItemLabel.Arrow0), tra.FindChild(SkillItemLabel.Arrow1), tra.FindChild(SkillItemLabel.Btn));
  514. }
  515. );
  516. SkillRoot skill = Manager.SkillDic["Ability1"];
  517. skill.ItemBtn.AddButtonEventOnetime
  518. (
  519. () =>
  520. {
  521. Tutorial.HightDisable(0, true);
  522. PayExemptAmt = 1;
  523. }
  524. );
  525. tween = ResourceManager.Get(ObjectLabel.Fe_Info).GetTweenCG();
  526. tween.AddEventOnetime
  527. (
  528. EventType.ForwardFinish,
  529. () =>
  530. {
  531. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.Fe_Arrow0), ResourceManager.Get(ObjectLabel.Fe_Arrow1), ResourceManager.Get(ObjectLabel.Fe_Btn));
  532. ResourceManager.AddButtonEventOnetime
  533. (
  534. ObjectLabel.Fe_Btn,
  535. () =>
  536. {
  537. ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
  538. EndOpenUnlockPanel();
  539. }
  540. );
  541. }
  542. );
  543. }
  544. public static void ClickConfirmButton()
  545. {
  546. TweenRoot tween = ResourceManager.Get(ObjectLabel.Fe_Info).GetTweenCG();
  547. tween.AddEventOnetime
  548. (
  549. EventType.BackwardFinish,
  550. () =>
  551. {
  552. Transform tra = Manager.SkillDic["Skill1"].SkillItem;
  553. Tutorial.HightScreen(tra.FindChild(SkillItemLabel.Arrow0), tra.FindChild(SkillItemLabel.Arrow1), tra.FindChild(SkillItemLabel.Btn));
  554. }
  555. );
  556. SkillRoot skill = Manager.SkillDic["Skill1"];
  557. skill.ItemBtn.AddButtonEventOnetime
  558. (
  559. () =>
  560. {
  561. Tutorial.HightDisable(0, true);
  562. PayExemptAmt = 1;
  563. }
  564. );
  565. tween = ResourceManager.Get(ObjectLabel.Fe_Info).GetTweenCG();
  566. tween.AddEventOnetime
  567. (
  568. EventType.ForwardFinish,
  569. () =>
  570. {
  571. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.Fe_Arrow0), ResourceManager.Get(ObjectLabel.Fe_Arrow1), ResourceManager.Get(ObjectLabel.Fe_Btn));
  572. ResourceManager.AddButtonEventOnetime
  573. (
  574. ObjectLabel.Fe_Btn,
  575. () =>
  576. {
  577. ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
  578. EndClickConfirmButton();
  579. }
  580. );
  581. }
  582. );
  583. }
  584. public static void UseBigSkill()
  585. {
  586. TweenRoot tween = ResourceManager.Get(ObjectLabel.Fe_Info).GetTweenCG();
  587. tween.AddEventOnetime
  588. (
  589. EventType.BackwardFinish,
  590. () =>
  591. {
  592. ConnectExempt = true;
  593. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_Arrow0), ResourceManager.Get(ObjectLabel.F_Skill1));
  594. }
  595. );
  596. ResourceManager.AddButtonEventOnetime
  597. (
  598. ObjectLabel.F_SkillBk11,
  599. () =>
  600. {
  601. EndUseBigSkill();
  602. ShowTip();
  603. }
  604. );
  605. }
  606. public static void ShowTip()
  607. {
  608. ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
  609. ResourceManager.Get(ObjectLabel.F_TipBK).TweenForCG();
  610. ResourceManager.SetText(ObjectLabel.F_Tip, Language.GetStr(LanguageLabel.UI__F_Tip));
  611. ResourceManager.SetActive(ObjectLabel.F_TipBtn, true);
  612. ResourceManager.AddButtonEventOnetime(ObjectLabel.F_TipBtn, () => EndShowTip());
  613. ResourceManager.Get<ContentSizeFitter>(ObjectLabel.F_TipBK).SetLayoutVertical();
  614. ResourceManager.Get<ContentSizeFitter>(ObjectLabel.F_TipBK).SetLayoutHorizontal();
  615. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_TipBtn), 3);
  616. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_TipBK), 1);
  617. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_Tip), 2);
  618. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_DataB), 1);
  619. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_CoinLab), 2);
  620. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_DiamondLab), 2);
  621. }
  622. public static void EndClickVisitBtn()
  623. {
  624. StaticsManager.GetInstance().TutoComplete("EndClickVisitBtn");
  625. Tutorial.HightDisable();
  626. VisitTutorial = false;
  627. ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
  628. PayExemptAmt = 0;
  629. ConnectExemptAmt = 0;
  630. }
  631. public static void ClickVisitBtn()
  632. {
  633. VisitTutorial = true;
  634. visitTutorial = false;
  635. UIManager.BlockOfflinePanel();
  636. TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
  637. if (tweenRoot.InDestination)
  638. {
  639. TweenRoot tween = ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
  640. tween.AddEventOnetime
  641. (
  642. EventType.BackwardFinish,
  643. () =>
  644. {
  645. ResourceManager.Get(ObjectLabel.F_Manage).TweenBacGra();
  646. tween = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
  647. tween.AddEventOnetime
  648. (
  649. EventType.BackwardFinish,
  650. () =>
  651. {
  652. ShowVisitBtn();
  653. }
  654. );
  655. }
  656. );
  657. }
  658. else
  659. {
  660. ShowVisitBtn();
  661. }
  662. ResourceManager.AddButtonEventOnetime
  663. (
  664. ObjectLabel.C_Return,
  665. () =>
  666. {
  667. TweenRoot tween = ResourceManager.Get(ObjectLabel.I_BlackMask).GetTweenCG();
  668. tween.AddEventOnetime
  669. (
  670. EventType.BackwardFinish,
  671. () =>
  672. {
  673. UIManager.UnblockOfflinePanel();
  674. }
  675. );
  676. }
  677. );
  678. }
  679. public static void ShowVisitBtn()
  680. {
  681. ResourceManager.Get(ObjectLabel.C_Main).TweenReForCG();
  682. ResourceManager.Get(ObjectLabel.C_Group).TweenReForCG();
  683. ResourceManager.Get(ObjectLabel.C_Group0).TweenReForCG();
  684. TweenRoot tween = ResourceManager.Get(ObjectLabel.C_Group).GetTweenCG();
  685. tween.AddEventOnetime
  686. (
  687. EventType.ForwardFinish,
  688. () =>
  689. {
  690. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  691. tween = ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
  692. tween.AddEventOnetime
  693. (
  694. EventType.ForwardFinish,
  695. () =>
  696. {
  697. PayExemptAmt = 1;
  698. ResourceManager.SetActive(ObjectLabel.C_Visit, true);
  699. ResourceManager.Get<HorizontalLayoutGroup>(ObjectLabel.C_Group4).SetLayoutHorizontal();
  700. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_VisitArrow0), ResourceManager.Get(ObjectLabel.C_Visit));
  701. ResourceManager.AddButtonEventOnetime
  702. (
  703. ObjectLabel.C_Visit,
  704. () =>
  705. {
  706. EndClickVisitBtn();
  707. }
  708. );
  709. }
  710. );
  711. }
  712. );
  713. }
  714. public static void EndShowFirstCorrectButton()
  715. {
  716. StaticsManager.GetInstance().TutoComplete("EndShowFirstCorrectButton");
  717. Tutorial.HightDisable(0, false);
  718. }
  719. public static void EndShowSecondCorrectButton()
  720. {
  721. StaticsManager.GetInstance().TutoComplete("EndShowSecondCorrectButton");
  722. Tutorial.HightDisable(0, false);
  723. }
  724. public static void EndShowThirdCorrectButton()
  725. {
  726. StaticsManager.GetInstance().TutoComplete("EndShowThirdCorrectButton");
  727. Tutorial.HightDisable(0, false);
  728. }
  729. public static void EndShowFourthCorrectButton()
  730. {
  731. StaticsManager.GetInstance().TutoComplete("EndShowFourthCorrectButton");
  732. Tutorial.HightDisable(0, false);
  733. }
  734. public static void EndShowFifthCorrectButton()
  735. {
  736. StaticsManager.GetInstance().TutoComplete("EndShowFifthCorrectButton");
  737. Tutorial.HightDisable(0, false);
  738. }
  739. public static void EndShowSixthCorrectButton()
  740. {
  741. StaticsManager.GetInstance().TutoComplete("EndShowSixthCorrectButton");
  742. Tutorial.HightDisable();
  743. MemoryMinigameTutorial = false;
  744. MiniGameManager.Pause = false;
  745. }
  746. public static void PlayMemoryGame()
  747. {
  748. memoryMinigameTutorial = false;
  749. ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
  750. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  751. MiniGameManager.Pause = true;
  752. int index = MiniGameManager.MemoryGameIndexMap(MiniGameManager.IndexList[0]);
  753. Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
  754. Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
  755. button.AddButtonEventOnetime
  756. (
  757. () =>
  758. {
  759. EndShowFirstCorrectButton();
  760. ShowSecondCorrectButton();
  761. }
  762. );
  763. }
  764. public static void ShowSecondCorrectButton()
  765. {
  766. int index = MiniGameManager.MemoryGameIndexMap(MiniGameManager.IndexList[0]);
  767. Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
  768. Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
  769. button.AddButtonEventOnetime
  770. (
  771. () =>
  772. {
  773. EndShowSecondCorrectButton();
  774. ShowThirdCorrectButton();
  775. }
  776. );
  777. }
  778. public static void ShowThirdCorrectButton()
  779. {
  780. int index = MiniGameManager.MemoryGameIndexMap(MiniGameManager.IndexList[0]);
  781. Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
  782. Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
  783. button.AddButtonEventOnetime
  784. (
  785. () =>
  786. {
  787. EndShowThirdCorrectButton();
  788. ShowFourthCorrectButton();
  789. }
  790. );
  791. }
  792. public static void ShowFourthCorrectButton()
  793. {
  794. int index = MiniGameManager.MemoryGameIndexMap(MiniGameManager.IndexList[0]);
  795. Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
  796. Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
  797. button.AddButtonEventOnetime
  798. (
  799. () =>
  800. {
  801. EndShowFourthCorrectButton();
  802. ShowFifthCorrectButton();
  803. }
  804. );
  805. }
  806. public static void ShowFifthCorrectButton()
  807. {
  808. int index = MiniGameManager.MemoryGameIndexMap(MiniGameManager.IndexList[0]);
  809. Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
  810. Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
  811. button.AddButtonEventOnetime
  812. (
  813. () =>
  814. {
  815. EndShowFifthCorrectButton();
  816. ShowSixthCorrectButton();
  817. }
  818. );
  819. }
  820. public static void ShowSixthCorrectButton()
  821. {
  822. int index = MiniGameManager.MemoryGameIndexMap(MiniGameManager.IndexList[0]);
  823. Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
  824. Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
  825. button.AddButtonEventOnetime
  826. (
  827. () =>
  828. {
  829. EndShowSixthCorrectButton();
  830. }
  831. );
  832. }
  833. public static void EndClickDressroomButton()
  834. {
  835. StaticsManager.GetInstance().TutoComplete("EndClickDressroomButton");
  836. DressroomTutorial = false;
  837. ResourceManager.Get(ObjectLabel.C_Main2).TweenForCG();
  838. Tutorial.HightDisable();
  839. ResourceManager.Get(ObjectLabel.N_LabBK).TweenBacCG();
  840. TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.I_BlackMask).TweenBacCG();
  841. tweenRoot.AddEventOnetime
  842. (
  843. EventType.BackwardFinish,
  844. () =>
  845. {
  846. Tutorial.MaskLock = true;
  847. ResourceManager.SetActive(ObjectLabel.N_Button, false);
  848. ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
  849. }
  850. );
  851. ResourceManager.AddButtonEventOnetime
  852. (
  853. ObjectLabel.P_Return,
  854. () =>
  855. {
  856. tweenRoot = ResourceManager.Get(ObjectLabel.I_BlackMask).TweenBacCG();
  857. tweenRoot.AddEventOnetime
  858. (
  859. EventType.ForwardFinish,
  860. () =>
  861. {
  862. UIManager.UnblockOfflinePanel();
  863. }
  864. );
  865. }
  866. );
  867. }
  868. public static void ClickDressroomButton()
  869. {
  870. DressroomTutorial = true;
  871. dressroomTutorial = false;
  872. UIManager.BlockOfflinePanel();
  873. TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
  874. if (tweenRoot.InDestination)
  875. {
  876. tweenRoot.AddEventOnetime
  877. (
  878. EventType.BackwardFinish,
  879. () =>
  880. {
  881. ShowDressroomButton();
  882. }
  883. );
  884. tweenRoot = ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
  885. tweenRoot.AddEventOnetime
  886. (
  887. EventType.BackwardFinish,
  888. () =>
  889. {
  890. tweenRoot = ResourceManager.Get(ObjectLabel.F_Manage).TweenBacGra();
  891. }
  892. );
  893. }
  894. else
  895. {
  896. ShowDressroomButton();
  897. }
  898. }
  899. public static void ShowDressroomButton()
  900. {
  901. ResourceManager.Get(ObjectLabel.C_Main).TweenReForCG();
  902. ResourceManager.Get(ObjectLabel.C_Group).TweenReForCG();
  903. ResourceManager.Get(ObjectLabel.C_Group0).TweenReForCG();
  904. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  905. ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
  906. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_DressRoomArrow), ResourceManager.Get(ObjectLabel.C_DressRoom));
  907. ResourceManager.AddButtonEventOnetime
  908. (
  909. ObjectLabel.C_DressRoom,
  910. () =>
  911. {
  912. EndClickDressroomButton();
  913. }
  914. );
  915. ResourceManager.SetText(ObjectLabel.N_Lab, Language.GetStr(LanguageLabel.UI__N_Lab));
  916. Tutorial.ShowDescriptScreen(ResourceManager.Get(ObjectLabel.C_DressRoomLabPos).position);
  917. }
  918. public static void EndClickCorrectButton()
  919. {
  920. StaticsManager.GetInstance().TutoComplete("EndClickCorrectButton");
  921. FindMinigameTutorial = false;
  922. Tutorial.HightDisable();
  923. ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
  924. MiniGameManager.Pause = false;
  925. }
  926. public static void PlayFindGame()
  927. {
  928. FindMinigameTutorial = true;
  929. findMinigameTutorial = false;
  930. }
  931. public static void ShowCorrectButton(Transform arrowTra, Transform targetTra)
  932. {
  933. MiniGameManager.Pause = true;
  934. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  935. Tutorial.HightScreen(arrowTra, targetTra);
  936. }
  937. public static void EndClickPlazaRoomBtn()
  938. {
  939. StaticsManager.GetInstance().TutoComplete("EndClickPlazaRoomBtn");
  940. Tutorial.HightDisable();
  941. PlazaRoomTutorial = false;
  942. ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
  943. PayExemptAmt = 0;
  944. ConnectExemptAmt = 0;
  945. ResourceManager.AddButtonEventOnetime
  946. (
  947. ObjectLabel.X_Quit,
  948. () =>
  949. {
  950. TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.V_BlackMask).TweenForCG();
  951. tweenRoot.AddEventOnetime
  952. (
  953. EventType.ForwardFinish,
  954. () =>
  955. {
  956. UIManager.UnblockOfflinePanel();
  957. }
  958. );
  959. }
  960. );
  961. }
  962. public static void ClickPlazaRoomBtn()
  963. {
  964. PlazaRoomTutorial = true;
  965. plazaRoomTutorial = false;
  966. UIManager.BlockOfflinePanel();
  967. TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
  968. if (tweenRoot.InDestination)
  969. {
  970. TweenRoot tween = ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
  971. tween.AddEventOnetime
  972. (
  973. EventType.BackwardFinish,
  974. () =>
  975. {
  976. ResourceManager.Get(ObjectLabel.F_Manage).TweenBacGra();
  977. tween = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
  978. tween.AddEventOnetime
  979. (
  980. EventType.BackwardFinish,
  981. () =>
  982. {
  983. ShowPlazaRoomBtn();
  984. }
  985. );
  986. }
  987. );
  988. }
  989. else
  990. {
  991. ShowPlazaRoomBtn();
  992. }
  993. }
  994. public static void ShowPlazaRoomBtn()
  995. {
  996. ResourceManager.Get(ObjectLabel.C_Main).TweenReForCG();
  997. ResourceManager.Get(ObjectLabel.C_Group).TweenReForCG();
  998. ResourceManager.Get(ObjectLabel.C_Group0).TweenReForCG();
  999. TweenRoot tween = ResourceManager.Get(ObjectLabel.C_Group).GetTweenCG();
  1000. tween.AddEventOnetime
  1001. (
  1002. EventType.ForwardFinish,
  1003. () =>
  1004. {
  1005. ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
  1006. tween = ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
  1007. tween.AddEventOnetime
  1008. (
  1009. EventType.ForwardFinish,
  1010. () =>
  1011. {
  1012. ResourceManager.SetActive(ObjectLabel.C_EnterPlazaRoom, true);
  1013. ResourceManager.Get<HorizontalLayoutGroup>(ObjectLabel.C_Group4).CalculateLayoutInputHorizontal();
  1014. ResourceManager.Get<HorizontalLayoutGroup>(ObjectLabel.C_Group4).SetLayoutHorizontal();
  1015. Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_PlazaRoomArrow0), ResourceManager.Get(ObjectLabel.C_EnterPlazaRoom));
  1016. ResourceManager.AddButtonEventOnetime
  1017. (
  1018. ObjectLabel.C_EnterPlazaRoom,
  1019. () =>
  1020. {
  1021. EndClickPlazaRoomBtn();
  1022. }
  1023. );
  1024. }
  1025. );
  1026. }
  1027. );
  1028. }
  1029. }