TutorialManager.cs 39 KB

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