1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339 |
- 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>(CanvasLabel.N_Mask).material = Lib.UIMaskMat;
- Tutorial.Arrow = ResourceManager.Get(CanvasLabel.N_Arrow);
- Tutorial.Material = ResourceManager.Get<Image>(CanvasLabel.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(CanvasLabel.C_MiniGame).TweenBacCG();
- ChoseCharacter();
- }
- else if (NewplayerTutorialIndex == SetNicknameTutorialIndex)
- {
- SetNickname();
- }
- else if (NewplayerTutorialIndex == 2)
- {
- ClickEnterMinigame();
- }
- else if (NewplayerTutorialIndex == 4)
- {
- ResourceManager.Get(CanvasLabel.C_MiniGame).TweenBacCG();
- ResourceManager.SetActive(CanvasLabel.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(CanvasLabel.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(CanvasLabel.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(CanvasLabel.F_TipBK).TweenBacCG();
- ResourceManager.SetActive(CanvasLabel.F_TipBtn, false);
- ResourceManager.SetActive(TutorialLabel.Tutorial, false);
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, false);
- ResourceManager.Get(CanvasLabel.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(CanvasLabel.N_Tutorial, true);
- ResourceManager.SetActive(CanvasLabel.N_Confirm, true);
- ResourceManager.SetActive(CanvasLabel.N_FormerPlayerButton, true);
- ResourceManager.AddButtonEvent
- (
- CanvasLabel.N_FormerPlayerButton,
- () =>
- {
- AudioManager.PlayClip(AudioLabel.ClickButton);
- ResourceManager.Get(CanvasLabel.La_Info).TweenForCG();
- ResourceManager.Get(CanvasLabel.N_Confirm).TweenBacCG();
- ResourceManager.Get(CanvasLabel.N_FormerPlayerButton).TweenBacCG();
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.La_Cancel,
- () =>
- {
- ResourceManager.Get(CanvasLabel.N_Confirm).TweenForCG();
- ResourceManager.Get(CanvasLabel.N_FormerPlayerButton).TweenForCG();
- }
- );
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.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(CanvasLabel.N_Confirm).TweenBacCG();
- ResourceManager.Get(CanvasLabel.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(CanvasLabel.C_Group).TweenForCG();
- ResourceManager.Get(CanvasLabel.C_MiniGame).TweenReForCG();
- ResourceManager.SetActive(CanvasLabel.C_Coin, false);
- ResourceManager.SetActive(CanvasLabel.C_Group1, false);
- ResourceManager.SetActive(CanvasLabel.C_Group3, false);
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, true);
- TweenRoot tween = ResourceManager.Get(CanvasLabel.N_Mask).TweenForGra();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.C_MiniArrow0), ResourceManager.Get(CanvasLabel.C_MiniArrow1), ResourceManager.Get(CanvasLabel.C_MiniGame));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.C_MiniGame,
- () =>
- {
- EndClickEnterMinigame();
- }
- );
- }
- public static void PlayPunchMinigame()
- {
- ResourceManager.Get(TutorialLabel.Tutorial).SetCollider(false);
- ResourceManager.SetActive(CanvasLabel.D_Quit, false);
- TweenRoot tween = ResourceManager.Get(CanvasLabel.D_MiniGame).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.D_BeginArrow0), ResourceManager.Get(CanvasLabel.D_BeginArrow1), ResourceManager.Get(CanvasLabel.D_Begin));
- }
- );
- ResourceManager.PushButtonEventOnetime
- (
- CanvasLabel.D_Begin,
- () =>
- {
- Tutorial.HightDisable();
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.Da_GetAward,
- () =>
- {
- EndPlayPunchMinigame();
- ResourceManager.Get(CanvasLabel.C_MiniGame).TweenBacCG();
- }
- );
- }
- public static void ClickSlot()
- {
- NewplayerTutorialIndex = 4;
- TweenRoot tween = ResourceManager.Get(CanvasLabel.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(CanvasLabel.G_Flower).TweenForCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Transform tra = ResourceManager.Get(CanvasLabel.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(CanvasLabel.H_FlowerCard).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.H_ArrowPos), ResourceManager.Get(CanvasLabel.H_Icon2));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.H_Icon2,
- () =>
- {
- Tutorial.HightDisable(0, true);
- ResourceManager.Get(CanvasLabel.H_FlowerCard).TweenBacCG();
- }
- );
- tween = ResourceManager.Get(CanvasLabel.H_FlowerCard).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.G_Arrow0), ResourceManager.Get(CanvasLabel.G_Close));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.G_Close,
- () =>
- {
- Tutorial.HightDisable();
- }
- );
- tween = ResourceManager.Get(CanvasLabel.G_Flower).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- EndPlantFlower();
- }
- );
- }
- public static void ClickManagePanel()
- {
- NewplayerTutorialIndex = 6;
- ResourceManager.SetActive(CanvasLabel.C_Coin, true);
- ResourceManager.SetActive(CanvasLabel.C_Group1, true);
- ResourceManager.SetActive(CanvasLabel.C_Group3, true);
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, true);
- TweenRoot tween = ResourceManager.Get(CanvasLabel.C_Group).TweenForCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish, () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.C_ManageArrow0), ResourceManager.Get(CanvasLabel.C_Manage));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.C_Manage,
- () =>
- {
- EndClickManagePanel();
- }
- );
- }
- public static void OpenUnlockPanel()
- {
- TweenRoot tween = ResourceManager.Get(CanvasLabel.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(CanvasLabel.Fe_Info).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.Fe_Arrow0), ResourceManager.Get(CanvasLabel.Fe_Arrow1), ResourceManager.Get(CanvasLabel.Fe_Btn));
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.Fe_Btn,
- () =>
- {
- ResourceManager.Get(CanvasLabel.Fe_Info).TweenBacCG();
- EndOpenUnlockPanel();
- }
- );
- }
- );
- }
- public static void ClickConfirmButton()
- {
- TweenRoot tween = ResourceManager.Get(CanvasLabel.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(CanvasLabel.Fe_Info).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.Fe_Arrow0), ResourceManager.Get(CanvasLabel.Fe_Arrow1), ResourceManager.Get(CanvasLabel.Fe_Btn));
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.Fe_Btn,
- () =>
- {
- ResourceManager.Get(CanvasLabel.Fe_Info).TweenBacCG();
- EndClickConfirmButton();
- }
- );
- }
- );
- }
- public static void UseBigSkill()
- {
- TweenRoot tween = ResourceManager.Get(CanvasLabel.Fe_Info).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ConnectExempt = true;
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.F_Arrow0), ResourceManager.Get(CanvasLabel.F_Skill1));
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.F_SkillBk11,
- () =>
- {
- EndUseBigSkill();
- ShowTip();
- }
- );
- }
- public static void ShowTip()
- {
- ResourceManager.Get(CanvasLabel.N_Mask).TweenForGra();
- ResourceManager.Get(CanvasLabel.F_TipBK).TweenForCG();
- ResourceManager.SetText(CanvasLabel.F_Tip, Language.GetStr(LanguageLabel.UI__F_Tip));
- ResourceManager.SetActive(CanvasLabel.F_TipBtn, true);
- ResourceManager.AddButtonEventOnetime(CanvasLabel.F_TipBtn, () => EndShowTip());
- ResourceManager.Get<ContentSizeFitter>(CanvasLabel.F_TipBK).SetLayoutVertical();
- ResourceManager.Get<ContentSizeFitter>(CanvasLabel.F_TipBK).SetLayoutHorizontal();
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.F_CoinLabArrow), ResourceManager.Get(CanvasLabel.F_TipBtn), 3);
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.F_CoinLabArrow), ResourceManager.Get(CanvasLabel.F_TipBK), 1);
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.F_CoinLabArrow), ResourceManager.Get(CanvasLabel.F_Tip), 2);
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.F_CoinLabArrow), ResourceManager.Get(CanvasLabel.F_DataB), 1);
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.F_CoinLabArrow), ResourceManager.Get(CanvasLabel.F_CoinLab), 2);
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.F_CoinLabArrow), ResourceManager.Get(CanvasLabel.F_DiamondLab), 2);
- }
- public static void EndClickVisitBtn()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickVisitBtn");
- Tutorial.HightDisable();
- VisitTutorial = false;
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, false);
- PayExemptAmt = 0;
- ConnectExemptAmt = 0;
- }
- public static void ClickVisitBtn()
- {
- VisitTutorial = true;
- visitTutorial = false;
- UIManager.BlockOfflinePanel();
- TweenRoot tweenRoot = ResourceManager.Get(CanvasLabel.F_Manage0).GetTweenVec();
- if (tweenRoot.InDestination)
- {
- TweenRoot tween = ResourceManager.Get(CanvasLabel.Fe_Info).TweenBacCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ResourceManager.Get(CanvasLabel.F_Manage).TweenBacGra();
- tween = ResourceManager.Get(CanvasLabel.F_Manage0).GetTweenVec();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ShowVisitBtn();
- }
- );
- }
- );
- }
- else
- {
- ShowVisitBtn();
- }
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.C_Return,
- () =>
- {
- TweenRoot tween = ResourceManager.Get(CanvasLabel.I_BlackMask).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- UIManager.UnblockOfflinePanel();
- }
- );
- }
- );
- }
- public static void ShowVisitBtn()
- {
- ResourceManager.Get(CanvasLabel.C_Main).TweenReForCG();
- ResourceManager.Get(CanvasLabel.C_Group).TweenReForCG();
- ResourceManager.Get(CanvasLabel.C_Group0).TweenReForCG();
- TweenRoot tween = ResourceManager.Get(CanvasLabel.C_Group).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, true);
- tween = ResourceManager.Get(CanvasLabel.N_Mask).TweenForGra();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- PayExemptAmt = 1;
- ResourceManager.SetActive(CanvasLabel.C_Visit, true);
- ResourceManager.Get<HorizontalLayoutGroup>(CanvasLabel.C_Group4).SetLayoutHorizontal();
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.C_VisitArrow0), ResourceManager.Get(CanvasLabel.C_Visit));
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.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(CanvasLabel.N_Mask).TweenForGra();
- ResourceManager.SetActive(CanvasLabel.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(CanvasLabel.C_Main2).TweenForCG();
- Tutorial.HightDisable();
- ResourceManager.Get(CanvasLabel.N_LabBK).TweenBacCG();
- TweenRoot tweenRoot = ResourceManager.Get(CanvasLabel.I_BlackMask).TweenBacCG();
- tweenRoot.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- Tutorial.MaskFlag = true;
- ResourceManager.SetActive(CanvasLabel.N_Button, false);
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, false);
- }
- );
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.P_Return,
- () =>
- {
- tweenRoot = ResourceManager.Get(CanvasLabel.I_BlackMask).TweenBacCG();
- tweenRoot.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- UIManager.UnblockOfflinePanel();
- }
- );
- }
- );
- }
- public static void ClickDressroomButton()
- {
- DressroomTutorial = true;
- dressroomTutorial = false;
- UIManager.BlockOfflinePanel();
- TweenRoot tweenRoot = ResourceManager.Get(CanvasLabel.F_Manage0).GetTweenVec();
- if (tweenRoot.InDestination)
- {
- tweenRoot.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ShowDressroomButton();
- }
- );
- tweenRoot = ResourceManager.Get(CanvasLabel.Fe_Info).TweenBacCG();
- tweenRoot.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- tweenRoot = ResourceManager.Get(CanvasLabel.F_Manage).TweenBacGra();
- }
- );
- }
- else
- {
- ShowDressroomButton();
- }
- }
- public static void ShowDressroomButton()
- {
- ResourceManager.Get(CanvasLabel.C_Main).TweenReForCG();
- ResourceManager.Get(CanvasLabel.C_Group).TweenReForCG();
- ResourceManager.Get(CanvasLabel.C_Group0).TweenReForCG();
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, true);
- ResourceManager.Get(CanvasLabel.N_Mask).TweenForGra();
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.C_DressRoomArrow), ResourceManager.Get(CanvasLabel.C_DressRoom));
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.C_DressRoom,
- () =>
- {
- EndClickDressroomButton();
- }
- );
- ResourceManager.SetText(CanvasLabel.N_Lab, Language.GetStr(LanguageLabel.UI__N_Lab));
- Tutorial.ShowDescriptScreen(ResourceManager.Get(CanvasLabel.C_DressRoomLabPos).position);
- }
- public static void EndClickCorrectButton()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickCorrectButton");
- FindMinigameTutorial = false;
- Tutorial.HightDisable();
- ResourceManager.SetActive(CanvasLabel.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(CanvasLabel.N_Tutorial, true);
- Tutorial.HightScreen(arrowTra, targetTra);
- }
- public static void EndClickPlazaRoomBtn()
- {
- StaticsManager.GetInstance().TutoComplete("EndClickPlazaRoomBtn");
- Tutorial.HightDisable();
- PlazaRoomTutorial = false;
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, false);
- PayExemptAmt = 0;
- ConnectExemptAmt = 0;
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.X_Quit,
- () =>
- {
- TweenRoot tweenRoot = ResourceManager.Get(CanvasLabel.V_BlackMask).TweenForCG();
- tweenRoot.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- UIManager.UnblockOfflinePanel();
- }
- );
- }
- );
- }
- public static void ClickPlazaRoomBtn()
- {
- PlazaRoomTutorial = true;
- plazaRoomTutorial = false;
- UIManager.BlockOfflinePanel();
- TweenRoot tweenRoot = ResourceManager.Get(CanvasLabel.F_Manage0).GetTweenVec();
- if (tweenRoot.InDestination)
- {
- TweenRoot tween = ResourceManager.Get(CanvasLabel.Fe_Info).TweenBacCG();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ResourceManager.Get(CanvasLabel.F_Manage).TweenBacGra();
- tween = ResourceManager.Get(CanvasLabel.F_Manage0).GetTweenVec();
- tween.AddEventOnetime
- (
- EventType.BackwardFinish,
- () =>
- {
- ShowPlazaRoomBtn();
- }
- );
- }
- );
- }
- else
- {
- ShowPlazaRoomBtn();
- }
- }
- public static void ShowPlazaRoomBtn()
- {
- ResourceManager.Get(CanvasLabel.C_Main).TweenReForCG();
- ResourceManager.Get(CanvasLabel.C_Group).TweenReForCG();
- ResourceManager.Get(CanvasLabel.C_Group0).TweenReForCG();
- TweenRoot tween = ResourceManager.Get(CanvasLabel.C_Group).GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ResourceManager.SetActive(CanvasLabel.N_Tutorial, true);
- tween = ResourceManager.Get(CanvasLabel.N_Mask).TweenForGra();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ResourceManager.SetActive(CanvasLabel.C_EnterPlazaRoom, true);
- ResourceManager.SetActive(CanvasLabel.C_EnterPlazaRoom0, true);
- ResourceManager.Get<HorizontalLayoutGroup>(CanvasLabel.C_Group4).CalculateLayoutInputHorizontal();
- ResourceManager.Get<HorizontalLayoutGroup>(CanvasLabel.C_Group4).SetLayoutHorizontal();
- Tutorial.HightScreen(ResourceManager.Get(CanvasLabel.C_PlazaRoomArrow0), ResourceManager.Get(CanvasLabel.C_EnterPlazaRoom));
- ResourceManager.AddButtonEventOnetime
- (
- CanvasLabel.C_EnterPlazaRoom,
- () =>
- {
- EndClickPlazaRoomBtn();
- }
- );
- }
- );
- }
- );
- }
- }
|