TutorialManager.cs 40 KB

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