123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338 |
- using System;
- using UnityEngine;
- using UnityEngine.UI;
- using System.Collections;
- using System.Collections.Generic;
- public class TutorialManager : Regist
- {
- #region Config
- public static bool PayExempt
- {
- get
- {
- if (payExempt)
- {
- return true;
- }
- else
- {
- if (PayExemptAmt > 0)
- {
- PayExemptAmt--;
- return true;
- }
- else
- {
- return false;
- }
- }
- }
- set { payExempt = value; }
- }
- public static bool payExempt;
- public static int PayExemptAmt;
- public static bool ConnectExempt
- {
- get
- {
- if (connectExempt)
- {
- return true;
- }
- else
- {
- if (ConnectExemptAmt > 0)
- {
- ConnectExemptAmt--;
- return true;
- }
- else
- {
- return false;
- }
- }
- }
- set { connectExempt = value; }
- }
- public static bool connectExempt;
- public static int ConnectExemptAmt;
- public static int MemoryMinigameTutorialLevel = 18;
- public static int VisitTutorialLevel = 8;
- public static int CommentTutorialLevel = 8;
- public static int DressroomTutorialLevel = 13;
- public static int FindMinigameTutorialLevel = 22;
- public static int PlazaRoomTutorialLevel = 28;
- public static int SetNicknameTutorialIndex = 7;
- public static int MinFlowerForFindGame = 2;
- public static bool NewplayerTutorial;
- public static int NewplayerTutorialIndex;
- public static bool MemoryMinigameTutorial;
- public static bool memoryMinigameTutorial;
- public static int MemoryMinigameTutorialIndex;
- public static bool VisitTutorial;
- public static bool visitTutorial;
- public static int VisitTutorialIndex;
- public static bool DressroomTutorial;
- public static bool dressroomTutorial;
- public static int DressroomTutorialIndex;
- public static bool FindMinigameTutorial;
- public static bool findMinigameTutorial;
- public static int FindMinigameTutorialIndex;
- public static bool PlazaRoomTutorial;
- public static bool plazaRoomTutorial;
- public static int PlazaRoomTutorialIndex;
- #endregion
- public override void InstantiatePrefabs()
- {
- if (NewplayerTutorial)
- {
- ResourceManager.Get(ResourceLabel.Tutorial, Folder.Scene, true, transform, false, ObjType.Tutorial).AddScript<Tutorial>();
- }
- }
- public override void ThirdInit()
- {
- ResourceManager.Get<Image>(ObjectLabel.N_Mask).material = Lib.UIMaskMat;
- Tutorial.Arrow = ResourceManager.Get(ObjectLabel.N_Arrow);
- Tutorial.Material = ResourceManager.Get<Image>(ObjectLabel.N_Mask).material;
- if (NewplayerTutorial)
- {
- ResourceManager.Get(TutorialLabel.TutorialMask).AddScript<SceneMask>();
- Vector3 playerDisplayScale = new Vector3(0.75f, 0.75f, 0.75f);
- Vector3 playerSelectScale = new Vector3(0.9f, 0.9f, 0.9f);
- ResourceManager.Get(TutorialLabel.Tutorial).CreateTweenSr(0, 1, 1f, true, true, Curve.EaseOutQuad, false, true).AlphaOnly = true;
- ResourceManager.Get(TutorialLabel.PlayerBk1).CreateTweenScale(playerDisplayScale, playerSelectScale, 1f, true, true, Curve.EaseOutQuad);
- ResourceManager.Get(TutorialLabel.PlayerBk2).CreateTweenScale(playerDisplayScale, playerSelectScale, 1f, true, true, Curve.EaseOutQuad);
- ResourceManager.Get(TutorialLabel.PlayerBk3).CreateTweenScale(playerDisplayScale, playerSelectScale, 1f, true, true, Curve.EaseOutQuad);
- ResourceManager.Get(TutorialLabel.TutorialMask).CreateTweenSr(0, 180 / 255f, 0.25f, true, true, Curve.EaseOutQuad);
- if (NewplayerTutorialIndex == 1)
- {
- ResourceManager.Get(ObjectLabel.C_MiniGame).TweenBacCG();
- ChoseCharacter();
- }
- else if (NewplayerTutorialIndex == SetNicknameTutorialIndex)
- {
- SetNickname();
- }
- else if (NewplayerTutorialIndex == 2)
- {
- ClickEnterMinigame();
- }
- else if (NewplayerTutorialIndex == 4)
- {
- ResourceManager.Get(ObjectLabel.C_MiniGame).TweenBacCG();
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- ResourceManager.SetActive(TutorialLabel.Tutorial, true);
- ResourceManager.SetActive(TutorialLabel.TutorialMask, true);
- ResourceManager.SetActive(TutorialLabel.TutorialCollider, true);
- Garden.Instance.TutorialToRegular();
- UIManager.Instance.TutorialToRegular();
- Transform tra = GardenManager.SlotList[0].transform;
- Tutorial.HightScene(0.1f, 0.075f, tra.FindChild(SlotLabel.SlotArrow), tra);
- }
- else if (NewplayerTutorialIndex == 6)
- {
- ResourceManager.Get(ObjectLabel.C_MiniGame).TweenBacCG();
- Garden.Instance.TutorialToRegular();
- UIManager.Instance.TutorialToRegular();
- ClickManagePanel();
- }
- }
- }
- public static void EndChoseCharacter()
- {
- StaticsManager.GetInstance().TutoComplete("EndChoseCharacter");
- Destroy(ResourceManager.Get(TutorialLabel.PlayerBk1).gameObject);
- Destroy(ResourceManager.Get(TutorialLabel.PlayerBk2).gameObject);
- Destroy(ResourceManager.Get(TutorialLabel.PlayerBk3).gameObject);
- SetNickname();
- }
- public static void EndSetNickname()
- {
- NickNameManager.CloseNickNameSettingPanel();
- NickNameManager.OnSetNickNameSucceed = null;
- StaticsManager.GetInstance().TutoComplete("EndSetNickname");
- ClickEnterMinigame();
- }
- public static void EndClickEnterMinigame()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickEnterMinigame");
- Tutorial.HightDisable();
- PlayPunchMinigame();
- }
- public static void EndPlayPunchMinigame()
- {
- StaticsManager.GetInstance().TutoComplete("EndPlayPunchMinigame");
- Tutorial.HightDisable();
- ResourceManager.SetActive(ObjectLabel.D_Quit, true);
- ClickSlot();
- }
- public static void EndClickSlot()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickSlot");
- Tutorial.HightDisable();
- PlantFlower();
- }
- public static void EndPlantFlower()
- {
- StaticsManager.GetInstance().TutoComplete("EndPlantFlower");
- ClickManagePanel();
- }
- public static void EndClickManagePanel()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickManagePanel");
- Tutorial.HightDisable();
- OpenUnlockPanel();
- }
- public static void EndOpenUnlockPanel()
- {
- StaticsManager.GetInstance().TutoComplete("EndOpenUnlockPanel");
- Tutorial.HightDisable(0, true);
- ClickConfirmButton();
- }
- public static void EndClickConfirmButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickConfirmButton");
- Tutorial.HightDisable(0, true);
- UseBigSkill();
- }
- public static void EndUseBigSkill()
- {
- Tutorial.HightDisable(0, false);
- }
- public static void EndShowTip()
- {
- StaticsManager.GetInstance().TutoComplete("EndShowTip");
- NewplayerTutorial = false;
- AudioManager.PlayClip(AudioLabel.Close);
- AchieveManager.UpdateHint();
- Tutorial.HightDisable();
- ResourceManager.Get(ObjectLabel.F_TipBK).TweenBacCG();
- ResourceManager.SetActive(ObjectLabel.F_TipBtn, false);
- ResourceManager.SetActive(TutorialLabel.Tutorial, false);
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
- ResourceManager.Get(ObjectLabel.C_MiniGame).TweenForCG();
- PlayerManager.Player.SetAllCollider(true);
- PayExemptAmt = 0;
- ConnectExempt = false;
- }
- public static void ChoseCharacter()
- {
- NewplayerTutorialIndex = 1;
- PlayerManager.DefaultPinkPlayer.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
- PlayerManager.DefaultBlondPlayer.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
- PlayerManager.DefaultBrownPlayer.CreateTweenScale(0.9f, 1f, true, true, Curve.EaseOutQuad);
- ResourceManager.Get(TutorialLabel.PlayerBk2).TweenForScale();
- PlayerManager.DefaultBlondPlayer.TweenForScale();
- ResourceManager.SetActive(TutorialLabel.PlayerBk1, true);
- ResourceManager.SetActive(TutorialLabel.PlayerBk2, true);
- ResourceManager.SetActive(TutorialLabel.PlayerBk3, true);
- ResourceManager.SetActive(TutorialLabel.TutorialMask, true);
- ResourceManager.SetActive(TutorialLabel.TutorialCollider, true);
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- ResourceManager.SetActive(ObjectLabel.N_Confirm, true);
- ResourceManager.SetActive(ObjectLabel.N_FormerPlayerButton, true);
- ResourceManager.AddButtonEvent
- (
- ObjectLabel.N_FormerPlayerButton,
- () =>
- {
- AudioManager.PlayClip(AudioLabel.ClickButton);
- ResourceManager.Get(ObjectLabel.La_Info).TweenForCG();
- ResourceManager.Get(ObjectLabel.N_Confirm).TweenBacCG();
- ResourceManager.Get(ObjectLabel.N_FormerPlayerButton).TweenBacCG();
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.La_Cancel,
- () =>
- {
- ResourceManager.Get(ObjectLabel.N_Confirm).TweenForCG();
- ResourceManager.Get(ObjectLabel.N_FormerPlayerButton).TweenForCG();
- }
- );
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.N_Confirm,
- () =>
- {
- if (PlayerManager.SelectedPlayer == PlayerManager.DefaultPinkPlayer)
- {
- PlayerManager.DressDatas.Add("脑壳3");
- PlayerManager.DressDatas.Add("裙子3");
- PlayerManager.DressDatas.Add("鞋子3");
- PlayerManager.DressDatas.Add("头饰品3");
- PlayerManager.DressDatas.Add("上衣3");
- PlayerManager.DressDatas.Add("眼睛3");
- PlayerManager.DressDatas.Add("嘴巴3");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("短袖1左");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("短袖1右");
- }
- else if (PlayerManager.SelectedPlayer == PlayerManager.DefaultBlondPlayer)
- {
- PlayerManager.DressDatas.Add("脑壳1");
- PlayerManager.DressDatas.Add("裙子1");
- PlayerManager.DressDatas.Add("鞋子1");
- PlayerManager.DressDatas.Add("头饰品1");
- PlayerManager.DressDatas.Add("上衣1");
- PlayerManager.DressDatas.Add("眼睛1");
- PlayerManager.DressDatas.Add("嘴巴1");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("短袖2左");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("短袖2右");
- }
- else if (PlayerManager.SelectedPlayer == PlayerManager.DefaultBrownPlayer)
- {
- PlayerManager.DressDatas.Add("脑壳2");
- PlayerManager.DressDatas.Add("裙子2");
- PlayerManager.DressDatas.Add("鞋子2");
- PlayerManager.DressDatas.Add("头饰品2");
- PlayerManager.DressDatas.Add("上衣2");
- PlayerManager.DressDatas.Add("眼睛2");
- PlayerManager.DressDatas.Add("嘴巴2");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("短袖2左");
- PlayerManager.DressDatas.Add("Empty");
- PlayerManager.DressDatas.Add("短袖2右");
- }
- foreach (var str in PlayerManager.DressDatas)
- {
- if (!PlayerManager.CloseIDDictionary.ContainsKey(str))
- {
- continue;
- }
- int id = PlayerManager.CloseIDDictionary[str];
- PlayerManager.CloseItemDictionary[id].Unlock();
- PlayerManager.BoughtCloseIDs.Add(id);
- }
- ConfigManager.SaveDress();
- Transform tra = PlayerManager.SelectedPlayer;
- PlayerManager.Player = tra.GetComponent<Player>();
- tra.parent = null;
- ResourceManager.TransformDictionary.Add(tra.name, tra);
- AudioManager.PlayClip(AudioLabel.ClickButton);
- if (PlayerManager.DefaultPinkPlayer != PlayerManager.SelectedPlayer)
- {
- PlayerManager.DefaultPinkPlayer.GetComponentInChildren<Renderer>(true).CreateTweenRenderer(0, 0.25f, true, false, Curve.EaseOutQuad, false, true).StartForward();
- }
- if (PlayerManager.DefaultBlondPlayer != PlayerManager.SelectedPlayer)
- {
- PlayerManager.DefaultBlondPlayer.GetComponentInChildren<Renderer>(true).CreateTweenRenderer(0, 0.25f, true, false, Curve.EaseOutQuad, false, true).StartForward();
- }
- if (PlayerManager.DefaultBrownPlayer != PlayerManager.SelectedPlayer)
- {
- PlayerManager.DefaultBrownPlayer.GetComponentInChildren<Renderer>(true).CreateTweenRenderer(0, 0.25f, true, false, Curve.EaseOutQuad, false, true).StartForward();
- }
- ResourceManager.Get(TutorialLabel.PlayerBk1).SetCollider(false);
- ResourceManager.Get(TutorialLabel.PlayerBk2).SetCollider(false);
- ResourceManager.Get(TutorialLabel.PlayerBk3).SetCollider(false);
- tra.CreateTweenScale(ResourceManager.Get(GardenLabel.GardenPlayerPos).localScale, 1f, true, true, Curve.EaseOutQuad);
- tra.CreateTweenVec3D(ResourceManager.Get(GardenLabel.GardenPlayerPos).position, 1f, false, true, true, Curve.EaseOutQuad);
- tra.SetParent(ResourceManager.Get(GardenLabel.GardenPivot));
- tra.TweenForVec();
- tra.TweenForScale();
- ResourceManager.Get(ObjectLabel.N_Confirm).TweenBacCG();
- ResourceManager.Get(ObjectLabel.N_FormerPlayerButton).TweenBacCG();
- TweenRoot tween = ResourceManager.Get(TutorialLabel.Tutorial).TweenBacSr();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- EndChoseCharacter();
- }
- );
- }
- );
- }
- public static void SetNickname()
- {
- NewplayerTutorialIndex = SetNicknameTutorialIndex;
- NickNameManager.ShowNickNameSettingPanelFirstTime();
- NickNameManager.OnSetNickNameSucceed = EndSetNickname;
- }
- public static void ClickEnterMinigame()
- {
- NewplayerTutorialIndex = 2;
- Garden.Instance.TutorialToRegular();
- UIManager.Instance.TutorialToRegular();
- ResourceManager.Get(ObjectLabel.C_Group).TweenForCG();
- ResourceManager.Get(ObjectLabel.C_MiniGame).TweenReForCG();
- ResourceManager.SetActive(ObjectLabel.C_Coin, false);
- ResourceManager.SetActive(ObjectLabel.C_Group1, false);
- ResourceManager.SetActive(ObjectLabel.C_Group3, false);
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- TweenRoot tween = ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_MiniArrow0), ResourceManager.Get(ObjectLabel.C_MiniArrow1), ResourceManager.Get(ObjectLabel.C_MiniGame));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.C_MiniGame,
- () =>
- {
- EndClickEnterMinigame();
- }
- );
- }
- public static void PlayPunchMinigame()
- {
- ResourceManager.Get(TutorialLabel.Tutorial).SetCollider(false);
- ResourceManager.SetActive(ObjectLabel.D_Quit, false);
- TweenRoot tween = ResourceManager.Get(ObjectLabel.D_MiniGame).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.D_BeginArrow0), ResourceManager.Get(ObjectLabel.D_BeginArrow1), ResourceManager.Get(ObjectLabel.D_Begin));
- }
- );
- ResourceManager.PushButtonEventOnetime
- (
- ObjectLabel.D_Begin,
- () =>
- {
- Tutorial.HightDisable();
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.Da_GetAward,
- () =>
- {
- EndPlayPunchMinigame();
- ResourceManager.Get(ObjectLabel.C_MiniGame).TweenBacCG();
- }
- );
- }
- public static void ClickSlot()
- {
- NewplayerTutorialIndex = 4;
- TweenRoot tween = ResourceManager.Get(ObjectLabel.D_MiniGame).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ResourceManager.Get(TutorialLabel.Tutorial).SetCollider(true);
- ResourceManager.Get<SpriteRenderer>(TutorialLabel.TutorialMask).material.SetAlpha(MaterialLabel.DefaultMatColor, 1);
- ResourceManager.SetActive(TutorialLabel.TutorialMask, true);
- ResourceManager.SetActive(TutorialLabel.TutorialCollider, true);
- Transform tra = GardenManager.SlotList[0].transform;
- Tutorial.HightScene(0.1f, 0.075f, tra.FindChild(SlotLabel.SlotArrow), tra);
- }
- );
- }
- public static void PlantFlower()
- {
- TweenRoot tween = ResourceManager.Get(ObjectLabel.G_Flower).TweenForCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Transform tra = ResourceManager.Get(ObjectLabel.G_RegularGrid).GetChild(0);
- Tutorial.HightScreen(tra.FindChild(FlowerItemLabel.ArrowPos), tra);
- }
- );
- FlowerInfo flowerInfo = GardenManager.FlowerInfoDictionary[1];
- flowerInfo.Button.AddButtonEventOnetime
- (
- () =>
- {
- Tutorial.HightDisable(0, true);
- }
- );
- tween = ResourceManager.Get(ObjectLabel.H_FlowerCard).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.H_ArrowPos), ResourceManager.Get(ObjectLabel.H_Icon2));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.H_Icon2,
- () =>
- {
- Tutorial.HightDisable(0, true);
- ResourceManager.Get(ObjectLabel.H_FlowerCard).TweenBacCG();
- }
- );
- tween = ResourceManager.Get(ObjectLabel.H_FlowerCard).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.G_Arrow0), ResourceManager.Get(ObjectLabel.G_Close));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.G_Close,
- () =>
- {
- Tutorial.HightDisable();
- }
- );
- tween = ResourceManager.Get(ObjectLabel.G_Flower).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- EndPlantFlower();
- }
- );
- }
- public static void ClickManagePanel()
- {
- NewplayerTutorialIndex = 6;
- ResourceManager.SetActive(ObjectLabel.C_Coin, true);
- ResourceManager.SetActive(ObjectLabel.C_Group1, true);
- ResourceManager.SetActive(ObjectLabel.C_Group3, true);
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- TweenRoot tween = ResourceManager.Get(ObjectLabel.C_Group).TweenForCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish, () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_ManageArrow0), ResourceManager.Get(ObjectLabel.C_Manage));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.C_Manage,
- () =>
- {
- EndClickManagePanel();
- }
- );
- }
- public static void OpenUnlockPanel()
- {
- TweenRoot tween = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Transform tra = Manager.SkillDictionary["Ability1"].SkillItem;
- Tutorial.HightScreen(tra.FindChild(SkillItemLabel.ArrowPosition), tra.FindChild(SkillItemLabel.ArrowDestination), tra.FindChild(SkillItemLabel.Button));
- }
- );
- SkillRoot skill = Manager.SkillDictionary["Ability1"];
- skill.button.AddButtonEventOnetime
- (
- () =>
- {
- Tutorial.HightDisable(0, true);
- PayExemptAmt = 1;
- }
- );
- tween = ResourceManager.Get(ObjectLabel.Fe_Info).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.Fe_Arrow0), ResourceManager.Get(ObjectLabel.Fe_Arrow1), ResourceManager.Get(ObjectLabel.Fe_Btn));
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.Fe_Btn,
- () =>
- {
- ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
- EndOpenUnlockPanel();
- }
- );
- }
- );
- }
- public static void ClickConfirmButton()
- {
- TweenRoot tween = ResourceManager.Get(ObjectLabel.Fe_Info).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- Transform tra = Manager.SkillDictionary["Skill1"].SkillItem;
- Tutorial.HightScreen(tra.FindChild(SkillItemLabel.ArrowPosition), tra.FindChild(SkillItemLabel.ArrowDestination), tra.FindChild(SkillItemLabel.Button));
- }
- );
- SkillRoot skill = Manager.SkillDictionary["Skill1"];
- skill.button.AddButtonEventOnetime
- (
- () =>
- {
- Tutorial.HightDisable(0, true);
- PayExemptAmt = 1;
- }
- );
- tween = ResourceManager.Get(ObjectLabel.Fe_Info).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.Fe_Arrow0), ResourceManager.Get(ObjectLabel.Fe_Arrow1), ResourceManager.Get(ObjectLabel.Fe_Btn));
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.Fe_Btn,
- () =>
- {
- ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
- EndClickConfirmButton();
- }
- );
- }
- );
- }
- public static void UseBigSkill()
- {
- TweenRoot tween = ResourceManager.Get(ObjectLabel.Fe_Info).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ConnectExempt = true;
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_Arrow0), ResourceManager.Get(ObjectLabel.F_Skill1));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.F_SkillBk11,
- () =>
- {
- EndUseBigSkill();
- ShowTip();
- }
- );
- }
- public static void ShowTip()
- {
- ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
- ResourceManager.Get(ObjectLabel.F_TipBK).TweenForCG();
- ResourceManager.SetText(ObjectLabel.F_Tip, Language.GetStr(LanguageLabel.UI__F_Tip));
- ResourceManager.SetActive(ObjectLabel.F_TipBtn, true);
- ResourceManager.AddButtonEventOnetime(ObjectLabel.F_TipBtn, () => EndShowTip());
- ResourceManager.Get<ContentSizeFitter>(ObjectLabel.F_TipBK).SetLayoutVertical();
- ResourceManager.Get<ContentSizeFitter>(ObjectLabel.F_TipBK).SetLayoutHorizontal();
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_TipBtn), 3);
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_TipBK), 1);
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_Tip), 2);
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_DataB), 1);
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_CoinLab), 2);
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.F_CoinLabArrow), ResourceManager.Get(ObjectLabel.F_DiamondLab), 2);
- }
- public static void EndClickVisitBtn()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickVisitBtn");
- Tutorial.HightDisable();
- VisitTutorial = false;
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
- PayExemptAmt = 0;
- ConnectExemptAmt = 0;
- }
- public static void ClickVisitBtn()
- {
- VisitTutorial = true;
- visitTutorial = false;
- UIManager.BlockOfflinePanel();
- TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
- if (tweenRoot.InDestination)
- {
- TweenRoot tween = ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ResourceManager.Get(ObjectLabel.F_Manage).TweenBacGra();
- tween = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ShowVisitBtn();
- }
- );
- }
- );
- }
- else
- {
- ShowVisitBtn();
- }
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.C_Return,
- () =>
- {
- TweenRoot tween = ResourceManager.Get(ObjectLabel.I_BlackMask).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- UIManager.UnblockOfflinePanel();
- }
- );
- }
- );
- }
- public static void ShowVisitBtn()
- {
- ResourceManager.Get(ObjectLabel.C_Main).TweenReForCG();
- ResourceManager.Get(ObjectLabel.C_Group).TweenReForCG();
- ResourceManager.Get(ObjectLabel.C_Group0).TweenReForCG();
- TweenRoot tween = ResourceManager.Get(ObjectLabel.C_Group).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- tween = ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- PayExemptAmt = 1;
- ResourceManager.SetActive(ObjectLabel.C_Visit, true);
- ResourceManager.Get<HorizontalLayoutGroup>(ObjectLabel.C_Group4).SetLayoutHorizontal();
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_VisitArrow0), ResourceManager.Get(ObjectLabel.C_Visit));
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.C_Visit,
- () =>
- {
- EndClickVisitBtn();
- }
- );
- }
- );
- }
- );
- }
- public static void EndShowFirstCorrectButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndShowFirstCorrectButton");
- Tutorial.HightDisable(0, false);
- }
- public static void EndShowSecondCorrectButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndShowSecondCorrectButton");
- Tutorial.HightDisable(0, false);
- }
- public static void EndShowThirdCorrectButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndShowThirdCorrectButton");
- Tutorial.HightDisable(0, false);
- }
- public static void EndShowFourthCorrectButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndShowFourthCorrectButton");
- Tutorial.HightDisable(0, false);
- }
- public static void EndShowFifthCorrectButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndShowFifthCorrectButton");
- Tutorial.HightDisable(0, false);
- }
- public static void EndShowSixthCorrectButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndShowSixthCorrectButton");
- Tutorial.HightDisable();
- MemoryMinigameTutorial = false;
- MiniGameManager.Pause = false;
- }
- public static void PlayMemoryGame()
- {
- memoryMinigameTutorial = false;
- ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- MiniGameManager.Pause = true;
- int index = MiniGameManager.GetMemoryGameButtonIndex(MiniGameManager.FindGameIndexList[0]);
- Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
- Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
- button.AddButtonEventOnetime
- (
- () =>
- {
- EndShowFirstCorrectButton();
- ShowSecondCorrectButton();
- }
- );
- }
- public static void ShowSecondCorrectButton()
- {
- int index = MiniGameManager.GetMemoryGameButtonIndex(MiniGameManager.FindGameIndexList[0]);
- Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
- Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
- button.AddButtonEventOnetime
- (
- () =>
- {
- EndShowSecondCorrectButton();
- ShowThirdCorrectButton();
- }
- );
- }
- public static void ShowThirdCorrectButton()
- {
- int index = MiniGameManager.GetMemoryGameButtonIndex(MiniGameManager.FindGameIndexList[0]);
- Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
- Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
- button.AddButtonEventOnetime
- (
- () =>
- {
- EndShowThirdCorrectButton();
- ShowFourthCorrectButton();
- }
- );
- }
- public static void ShowFourthCorrectButton()
- {
- int index = MiniGameManager.GetMemoryGameButtonIndex(MiniGameManager.FindGameIndexList[0]);
- Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
- Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
- button.AddButtonEventOnetime
- (
- () =>
- {
- EndShowFourthCorrectButton();
- ShowFifthCorrectButton();
- }
- );
- }
- public static void ShowFifthCorrectButton()
- {
- int index = MiniGameManager.GetMemoryGameButtonIndex(MiniGameManager.FindGameIndexList[0]);
- Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
- Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
- button.AddButtonEventOnetime
- (
- () =>
- {
- EndShowFifthCorrectButton();
- ShowSixthCorrectButton();
- }
- );
- }
- public static void ShowSixthCorrectButton()
- {
- int index = MiniGameManager.GetMemoryGameButtonIndex(MiniGameManager.FindGameIndexList[0]);
- Button button = MiniGameManager.D_MemoryGameBtns[index].GetComponent<Button>();
- Tutorial.HightScreen(MiniGameManager.D_MemoryGameArrows[index], button.transform);
- button.AddButtonEventOnetime
- (
- () =>
- {
- EndShowSixthCorrectButton();
- }
- );
- }
- public static void EndClickDressroomButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickDressroomButton");
- DressroomTutorial = false;
- ResourceManager.Get(ObjectLabel.C_Main2).TweenForCG();
- Tutorial.HightDisable();
- ResourceManager.Get(ObjectLabel.N_LabBK).TweenBacCG();
- TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.I_BlackMask).TweenBacCG();
- tweenRoot.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- Tutorial.MaskFlag = true;
- ResourceManager.SetActive(ObjectLabel.N_Button, false);
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.P_Return,
- () =>
- {
- tweenRoot = ResourceManager.Get(ObjectLabel.I_BlackMask).TweenBacCG();
- tweenRoot.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- UIManager.UnblockOfflinePanel();
- }
- );
- }
- );
- }
- public static void ClickDressroomButton()
- {
- DressroomTutorial = true;
- dressroomTutorial = false;
- UIManager.BlockOfflinePanel();
- TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
- if (tweenRoot.InDestination)
- {
- tweenRoot.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ShowDressroomButton();
- }
- );
- tweenRoot = ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
- tweenRoot.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- tweenRoot = ResourceManager.Get(ObjectLabel.F_Manage).TweenBacGra();
- }
- );
- }
- else
- {
- ShowDressroomButton();
- }
- }
- public static void ShowDressroomButton()
- {
- ResourceManager.Get(ObjectLabel.C_Main).TweenReForCG();
- ResourceManager.Get(ObjectLabel.C_Group).TweenReForCG();
- ResourceManager.Get(ObjectLabel.C_Group0).TweenReForCG();
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_DressRoomArrow), ResourceManager.Get(ObjectLabel.C_DressRoom));
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.C_DressRoom,
- () =>
- {
- EndClickDressroomButton();
- }
- );
- ResourceManager.SetText(ObjectLabel.N_Lab, Language.GetStr(LanguageLabel.UI__N_Lab));
- Tutorial.ShowDescriptScreen(ResourceManager.Get(ObjectLabel.C_DressRoomLabPos).position);
- }
- public static void EndClickCorrectButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickCorrectButton");
- FindMinigameTutorial = false;
- Tutorial.HightDisable();
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
- MiniGameManager.Pause = false;
- }
- public static void PlayFindGame()
- {
- FindMinigameTutorial = true;
- findMinigameTutorial = false;
- }
- public static void ShowCorrectButton(Transform arrowTra, Transform targetTra)
- {
- MiniGameManager.Pause = true;
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- Tutorial.HightScreen(arrowTra, targetTra);
- }
- public static void EndClickPlazaRoomBtn()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickPlazaRoomBtn");
- Tutorial.HightDisable();
- PlazaRoomTutorial = false;
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, false);
- PayExemptAmt = 0;
- ConnectExemptAmt = 0;
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.X_Quit,
- () =>
- {
- TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.V_BlackMask).TweenForCG();
- tweenRoot.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- UIManager.UnblockOfflinePanel();
- }
- );
- }
- );
- }
- public static void ClickPlazaRoomBtn()
- {
- PlazaRoomTutorial = true;
- plazaRoomTutorial = false;
- UIManager.BlockOfflinePanel();
- TweenRoot tweenRoot = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
- if (tweenRoot.InDestination)
- {
- TweenRoot tween = ResourceManager.Get(ObjectLabel.Fe_Info).TweenBacCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ResourceManager.Get(ObjectLabel.F_Manage).TweenBacGra();
- tween = ResourceManager.Get(ObjectLabel.F_Manage0).GetTweenVec();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ShowPlazaRoomBtn();
- }
- );
- }
- );
- }
- else
- {
- ShowPlazaRoomBtn();
- }
- }
- public static void ShowPlazaRoomBtn()
- {
- ResourceManager.Get(ObjectLabel.C_Main).TweenReForCG();
- ResourceManager.Get(ObjectLabel.C_Group).TweenReForCG();
- ResourceManager.Get(ObjectLabel.C_Group0).TweenReForCG();
- TweenRoot tween = ResourceManager.Get(ObjectLabel.C_Group).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ResourceManager.SetActive(ObjectLabel.N_Tutorial, true);
- tween = ResourceManager.Get(ObjectLabel.N_Mask).TweenForGra();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ResourceManager.SetActive(ObjectLabel.C_EnterPlazaRoom, true);
- ResourceManager.Get<HorizontalLayoutGroup>(ObjectLabel.C_Group4).CalculateLayoutInputHorizontal();
- ResourceManager.Get<HorizontalLayoutGroup>(ObjectLabel.C_Group4).SetLayoutHorizontal();
- Tutorial.HightScreen(ResourceManager.Get(ObjectLabel.C_PlazaRoomArrow0), ResourceManager.Get(ObjectLabel.C_EnterPlazaRoom));
- ResourceManager.AddButtonEventOnetime
- (
- ObjectLabel.C_EnterPlazaRoom,
- () =>
- {
- EndClickPlazaRoomBtn();
- }
- );
- }
- );
- }
- );
- }
- }
|