1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003 |
- using UnityEngine;
- using UnityEngine.UI;
- using UnityEngine.Serialization;
- using System;
- using System.Xml;
- using System.Collections;
- using System.Collections.Generic;
- using Random = UnityEngine.Random;
- public class Award
- {
- #region 变量
- public static int BonusCoin;
- public static int BonusDiamond;
- public int DiamondMin;
- public int DiamondMax;
- public string CoinFml;
- public string FlowerFml;
- public string DiamondFml;
- public List<float> Odds = new List<float>();
- public List<float> Standard = new List<float>();
- #endregion
- public Award(XmlAttributeCollection attribute)
- {
- Flower.CoinFml = attribute[8].Value;
- DropGold.CoinFml = attribute[7].Value;
- CoinFml = attribute[1].Value;
- FlowerFml = attribute[4].Value;
- DiamondFml = attribute[3].Value;
-
- string[] strings = attribute[2].Value.Split(',');
- DiamondMin = int.Parse(strings[0]);
- DiamondMax = int.Parse(strings[1]);
- strings = attribute[5].Value.Split(',');
- Odds = new List<float>()
- {
- float.Parse(strings[0]),
- float.Parse(strings[1]),
- float.Parse(strings[2]),
- };
- strings = attribute[6].Value.Split(',');
- Standard = new List<float>()
- {
- float.Parse(strings[0]),
- float.Parse(strings[1]),
- float.Parse(strings[2]),
- };
- }
- public void GetAward(int score)
- {
- #region 获得奖励
- #region Rate
- int rate;
- if (score < Standard[1])
- {
- rate = 0;
- }
- else if (score < Standard[2])
- {
- rate = 1;
- }
- else
- {
- rate = 2;
- }
- #endregion
- #region Reset
- bool flowerFlag = false;
- bool diamondFlag = false;
- #endregion
- #region Coin
- int coin = (int)Auxiliary.FmlParse(CoinFml, "s", score.ToString(), "l", Mathf.Clamp(ManaData.Level, 1, 9999).ToString());
- coin = (int) (coin*(1 + ManaData.SkillPlus) + BonusCoin);
- ManaData.Coin += coin;
- #endregion
- #region Flower
- if (ManaTutorial.TutorialA)
- {
- flowerFlag = true;
- FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic[1];
- Vector2 newSize = flowerInfo.Icon.rect.size;
- newSize.x *= 0.2f;
- newSize.y *= 0.2f;
- ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
- ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
- ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
- }
- else
- {
- float flowerRate = (float)Auxiliary.FmlParse(DiamondFml, "l", ManaData.Level.ToString(), "f", ManaGarden.MyFlower.ToString());
- if (Random.Range(0, 1f) <= flowerRate)
- {
- if (Random.Range(0, 1f) <= Odds[rate])
- {
- while (true)
- {
- FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic.Random();
- if (flowerInfo.Unlock)
- {
- flowerFlag = true;
- Vector2 newSize = flowerInfo.Icon.rect.size;
- newSize.x *= 0.2f;
- newSize.y *= 0.2f;
- ManaReso.Get<Image>("Da_FlowerIcon").sprite = flowerInfo.Icon;
- ManaReso.Get<Image>("Da_FlowerIcon").rectTransform.sizeDelta = newSize;
- ManaReso.SetText("Da_FlowerLab", Language.GetStr("FlowerName", "Flower" + flowerInfo.ID_));
- break;
- }
- }
- }
- }
- }
- #endregion
- #region Diamond
- int diamond = 0;
- float diamondRate = (float)Auxiliary.FmlParse(DiamondFml, "l", Mathf.Clamp(ManaData.Level, 1, 1000).ToString());
-
- if (Random.Range(0, 1f) <= diamondRate)
- {
- diamondFlag = true;
- diamond = (int) (Mathf.Lerp(DiamondMin, DiamondMax, Random.Range(0, 1f)) + BonusDiamond);
- ManaData.Diamond += diamond;
- ManaReso.SetActive("Da_Diamond", true);
- }
- else
- {
- if (BonusDiamond > 0)
- {
- diamondFlag = true;
- diamond = BonusDiamond;
- ManaData.Diamond += diamond;
-
- ManaReso.SetActive("Da_Diamond", true);
- }
- }
- #endregion
- BonusCoin = 0;
- BonusDiamond = 0;
- #endregion
- #region 构造动画
- #region Reset
- ManaReso.Get("Da_Info").TweenForCG();
- ManaReso.SetText("Da_Tit", Language.GetStr("UI", "Da_Tit1"));
- ManaReso.SetText("Da_CoinLab", "0");
- ManaReso.SetText("Da_DiamondLab", "0");
- ManaReso.SetActive("Da_Lab", false);
- ManaReso.SetActive("Da_Quit", false);
- ManaReso.SetActive("Da_Cancel", false);
- ManaReso.SetActive("Da_CoinLab", false);
- ManaReso.SetActive("Da_ScoreTit", false);
- ManaReso.SetActive("Da_ScoreLab", false);
- ManaReso.SetActive("Da_GetAward", false);
- ManaReso.SetActive("Da_DiamondLab", false);
- ManaReso.SetActive("Da_VGroup", true);
- ManaReso.SetActive("Da_HGroup", false);
- ManaReso.SetActive("Da_FlowerGroup", false);
- ManaReso.SetActive("Da_DiamondGroup", false);
- if (flowerFlag)
- {
- ManaReso.SetActive("Da_FlowerGroup", true);
- }
- if (diamondFlag)
- {
- ManaReso.SetActive("Da_DiamondGroup", true);
- }
- Auxiliary.Instance.DelayCall
- (
- () =>
- {
- ManaReso.Get<VerticalLayoutGroup>("Da_VGroup").enabled = false;
- ManaReso.SetActive("Da_CoinGroup", false);
- ManaReso.SetActive("Da_FlowerGroup", false);
- ManaReso.SetActive("Da_DiamondGroup", false);
- },
- 1
- );
- float timeCoin = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(coin / 15f));
- float timeScore = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(score/50f));
- float timeDiamond = Mathf.Lerp(0, 1.5f, Mathf.Clamp01(diamond / 15f));
-
- float time = Mathf.Max(timeCoin, timeDiamond);
- ManaReso.Get("Da_CoinLab").CreateTweenNumber(0, coin, time, false, true, Curve.EaseOutQuad);
- ManaReso.Get("Da_ScoreLab").CreateTweenNumber(0, score, timeScore, false, true, Curve.EaseOutQuad);
- ManaReso.Get("Da_DiamondLab").CreateTweenNumber(0, diamond, time, false, true, Curve.EaseOutQuad);
-
- #endregion
- #region 花
- Tween tween;
- if (flowerFlag)
- {
- tween = ManaReso.Get("Da_CoinLab").GetTweenNumber();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_FlowerGroup").TweenForScale();
- }
- );
- }
- #endregion
- #region 按钮
- if (flowerFlag)
- {
- tween = ManaReso.Get("Da_FlowerGroup").GetTweenScale();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_GetAward").TweenForCG();
- }
- );
- }
- else
- {
- tween = ManaReso.Get("Da_CoinLab").GetTweenNumber();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_GetAward").TweenForCG();
- }
- );
- }
- if (ManaTutorial.TutorialA)
- {
- tween = ManaReso.Get("Da_GetAward").GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- Tutorial.HightScreen(ManaReso.Get("Da_Arrow0"), ManaReso.Get("Da_Arrow1"), ManaReso.Get("Da_GetAward"));
- }
- );
- }
- ManaReso.AddButtonEventOnetime
- (
- "Da_GetAward",
- () =>
- {
- ManaReso.Get("Da_VGroup").GetComponent<VerticalLayoutGroup>().enabled = true;
- }
- );
- #endregion
- #region 得分
- if (rate == 0)
- {
- tween = ManaReso.Get("Da_Star1").GetTweenScale();
- }
- else if (rate == 1)
- {
- tween = ManaReso.Get("Da_Star2").GetTweenScale();
- }
- else if (rate == 2)
- {
- tween = ManaReso.Get("Da_Star3").GetTweenScale();
- }
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_ScoreTit").TweenForFont();
- }
- );
- tween = ManaReso.Get("Da_ScoreTit").GetTweenFont();
- tween.InOrigin = true;
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_ScoreLab").TweenForNumber();
- }
- );
- #endregion
- #region 五角星
- tween = ManaReso.Get("Da_Star3").GetTweenScale();
- tween.InOrigin = true;
- tween = ManaReso.Get("Da_Star2").GetTweenScale();
- tween.InOrigin = true;
- tween = ManaReso.Get("Da_Star1").GetTweenScale();
- tween.InOrigin = true;
- tween = ManaReso.Get("Da_Info").GetTweenCG();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_Star1").TweenForScale();
- ManaReso.SetActive("Da_HGroup", true);
- }
- );
- if (rate == 0)
- {
- ManaReso.SetActive("Da_Star2", false);
- ManaReso.SetActive("Da_Star3", false);
- }
- else if (rate == 1)
- {
- ManaReso.SetActive("Da_Star2", true);
- ManaReso.SetActive("Da_Star3", false);
- tween = ManaReso.Get("Da_Star1").GetTweenScale();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_Star2").TweenForScale();
- }
- );
- }
- else if (rate == 2)
- {
- ManaReso.SetActive("Da_Star2", true);
- ManaReso.SetActive("Da_Star3", true);
- tween = ManaReso.Get("Da_Star1").GetTweenScale();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_Star2").TweenForScale();
- }
- );
- tween = ManaReso.Get("Da_Star2").GetTweenScale();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_Star3").TweenForScale();
- }
- );
- }
- #endregion
- #region 金币钻石
- tween = ManaReso.Get("Da_ScoreLab").GetTweenNumber();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_CoinGroup").TweenForScale();
- if (diamondFlag)
- {
- ManaReso.Get("Da_DiamondGroup").TweenForScale();
- }
- }
- );
- tween = ManaReso.Get("Da_CoinGroup").GetTweenScale();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_CoinLab").TweenForNumber();
- }
- );
- if (diamondFlag)
- {
- tween = ManaReso.Get("Da_DiamondGroup").GetTweenScale();
- tween.AddEventOnetime
- (
- EventType.ForwardFinish,
- () =>
- {
- ManaReso.Get("Da_DiamondLab").TweenForNumber();
- }
- );
- }
- #endregion
- #endregion
- }
- }
- public class ManaMiniGame : Regist
- {
- #region 变量
- public static int Score
- {
- get { return _Score; }
- set
- {
- _Score = value;
- ManaReso.SetText("D_ScoreLab", ScoreLab + _Score.ToString());
- }
- }
- public static bool Game
- {
- get { return _Game; }
- set
- {
- _Game = value;
- if (_Game)
- {
- ManaReso.SetText("D_StatusLab", Language.GetStr("UI", "D_StatusLab1"));
- }
- else
- {
- ManaReso.SetText("D_StatusLab", Language.GetStr("UI", "D_StatusLab0"));
- }
- }
- }
- public static bool Pause
- {
- get { return _Pause; }
- set
- {
- _Pause = value;
- if (Game)
- {
- if (_Pause)
- {
- ManaReso.SetText("D_StatusLab", Language.GetStr("UI", "D_StatusLab2"));
- }
- else
- {
- ManaReso.SetText("D_StatusLab", Language.GetStr("UI", "D_StatusLab1"));
- }
- }
- else if (Prepare)
- {
- if (_Pause)
- {
- PrepareLab.GetStreamScale().Pause();
- }
- else
- {
- PrepareLab.GetStreamScale().Resume();
- }
- }
- }
- }
- public static bool Panalty
- {
- get { return _Panalty; }
- set
- {
- _Panalty = value;
- if (Game)
- {
- if (_Panalty)
- {
- ManaReso.SetText("D_StatusLab", Language.GetStr("UI", "D_StatusLab3"));
- }
- else
- {
- ManaReso.SetText("D_StatusLab", Language.GetStr("UI", "D_StatusLab1"));
- }
- }
- }
- }
- public static float GameTimer
- {
- get { return _GameTimer; }
- set
- {
- _GameTimer = value;
- TimerLab.text = (GameTime-_GameTimer).ToString("0.0");
- try
- {
- TimerBk.fillAmount = _GameTimer/GameTime;
- TimerBk.material.SetFloat("_Fill", TimerBk.fillAmount);
- ManaDebug.Log("<color=blue>" + "fillAmount :" + TimerBk.fillAmount + "</color>");
- }
- catch (Exception e)
- {
- ManaDebug.Log("<color=blue>" + e.Message + "</color>");
- }
- }
- }
- public static float PrepareTimer
- {
- get { return _PrepareTimer; }
- set
- {
- _PrepareTimer = value;
- PrepareLab.text = Mathf.CeilToInt(_PrepareTimer).ToString();
- }
- }
- private static int _Score;
- private static bool _Game;
- private static bool _Pause;
- private static bool _Panalty;
- private static float _GameTimer;
- private static float _PrepareTimer;
- public static Text BtnLab;
- public static Text TimerLab;
- public static Text PrepareLab;
- public static Image TimerBk;
- public static Award Award;
- public static List<Drop> DropList = new List<Drop>();
- public static List<Flower> OpList = new List<Flower>();
- public static List<Flower> IdleList = new List<Flower>();
- public static int Flower;
- public static int MiniGameIndex;
- public static bool Prepare;
- public static bool TutorialValidA = true;
- public static bool DropDiamond;
- public static float OpTime = 1.5f;
- public static float OpTimer;
- public static float GoldTimer;
- public static float GameTime = 45;
- public static float PanaltyTime = 1;
- public static float NewOpTime;
- public static float PanaltyTimer;
- public static float DiamondTimer;
- public static string ScoreLab;
- #endregion
- private void FixedUpdate()
- {
- if (Game)
- {
- GameThread();
- }
- if (Prepare)
- {
- PrepareThread();
- }
- }
- private void GameThread()
- {
- if (Pause)
- {
- return;
- }
- GameTimer += Time.fixedDeltaTime * 15;
- if (GameTimer >= GameTime)
- {
- GameOver();
- return;
- }
- if (Panalty)
- {
- PanaltyTimer -= Time.fixedDeltaTime;
- if (PanaltyTimer <= 0)
- {
- Panalty = false;
- }
- }
- if (IdleList.Count > 0)
- {
- OpTimer -= Time.fixedDeltaTime;
- if (OpTimer <= 0)
- {
- NewOpTime -= NewOpTime * 0.03f;
- OpTimer = NewOpTime;
- CreateOperate();
- }
- }
- BonusThread();
- }
- private void BonusThread()
- {
- if (Pause)
- {
- return;
- }
- GoldTimer -= Time.fixedDeltaTime;
- if (GoldTimer < 0)
- {
- GoldTimer = Random.Range(3f, 6f);
- DropList.Add(ManaReso.GetDrop(ObjType.DropGold));
- }
- if (DropDiamond)
- {
- DiamondTimer -= Time.fixedDeltaTime;
- if (DiamondTimer < 0)
- {
- DropDiamond = false;
- DropList.Add(ManaReso.GetDrop(ObjType.DropDiamond));
- }
- }
- }
- private void PrepareThread()
- {
- if (Pause)
- {
- return;
- }
-
- PrepareTimer -= Time.fixedDeltaTime;
- if (PrepareTimer <= 0)
- {
- Prepare = false;
- GameBegin();
- }
- }
- private void CreateOperate()
- {
- ManaAudio.PlayClip(Clip.BubbleClip);
- if (ManaTutorial.TutorialA && TutorialValidA)
- {
- Pause = true;
- TutorialValidA = false;
- Flower flower = IdleList[4];
- flower.CreateOp(OpList.Count, OpType.Water);
- OpList.Add(flower);
- IdleList.Remove(flower);
- Tutorial.HightScreen(ManaReso.Get("D_WaterArrow0"), ManaReso.Get("D_WaterArrow1"), ManaReso.Get("D_Water1"));
- Tutorial.SetArea(OpList[0].OperateIcon.transform, 0.1f, 0.125f);
- ManaReso.AddButtonEventOnetime
- (
- "D_Water2",
- () =>
- {
- Pause = false;
- Tutorial.HightDisable();
- }
- );
- }
- else
- {
- Flower flower = IdleList[Random.Range(0, IdleList.Count)];
- flower.CreateOp(OpList.Count);
- OpList.Add(flower);
- IdleList.Remove(flower);
- }
- }
- public override void RegistValueA()
- {
- Award = new Award(Data.GetAwardConfig());
- MiniGameIndex = Data.GetPlayerInt("MiniGameIndex");
- }
- public override void RegistReference()
- {
- BtnLab = ManaReso.Get<Text>("D_BeginLab");
- TimerLab = ManaReso.Get<Text>("D_TimerLab");
- PrepareLab = ManaReso.Get<Text>("D_PrepareLab");
- TimerBk = ManaReso.Get<Image>("D_TimerIcon");
- }
- #region MiniGame
- public static void Operate(OpType opType)
- {
- if (Panalty || !OpList.Valid())
- {
- return;
- }
- if (OpList[0].Operate(opType))
- {
- IdleList.Add(OpList[0]);
- OpList.Remove(OpList[0]);
- if (OpList.Count >= 2)
- {
- OpList[0].FirstOp();
- OpList[1].SecondOp();
- }
- else if (OpList.Count >= 1)
- {
- OpList[0].FirstOp();
- }
- }
- else
- {
- Panalty = true;
- PanaltyTimer = PanaltyTime;
- }
- }
- public static void GameEnd()
- {
- if (Game)
- {
- ManaData.MiniValid = false;
- ManaData.MiniTimer = Mathf.Lerp(180, 300, Random.Range(0, 1f));
- ManaDebug.Log(string.Format("<color=red>{0:0}</color>秒后激活小游戏", ManaData.MiniTimer));
- }
- if (ManaData.MiniTimer <= 0)
- {
- ManaReso.Get("C_MiniGame").TweenForCG();
- }
- Score = 0;
- Pause = false;
- Game = false;
- Panalty = false;
- Prepare = false;
- for (int i = 0; i < OpList.Count; i++)
- {
- OpList[i].GameOver();
- }
- for (int i = 0; i < IdleList.Count; i++)
- {
- IdleList[i].GameOver();
- }
- for (int i = 0; i < DropList.Count; i++)
- {
- DropList[i].Retrieve();
- DropList.RemoveAt(i--);
- }
- }
- public static void GameOver()
- {
- ManaAudio.PlayClip(Clip.MiniEndClip);
- Award.GetAward(Score);
- ManaData.MiniGameAmt++;
- GameEnd();
- }
- public static void GameEnter()
- {
- if (ManaGarden.MyFlower < ManaGarden.TotalFlower)
- {
- while (true)
- {
- FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic.Random();
- if (!flowerInfo.Unlock)
- {
- Flower = flowerInfo.ID_;
- break;
- }
- }
- }
- else
- {
- Flower = Random.Range(0, ManaGarden.FlowerInfoDic.Count);
- }
- int flowerAmt = 1;
- while (true)
- {
- FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic.Random();
- if (flowerInfo.Unlock)
- {
- IdleList.Add(ManaReso.GetFlower(flowerInfo, ManaReso.Get("SlotMini" + flowerAmt)));
- flowerAmt++;
- if (flowerAmt == 10)
- {
- break;
- }
- }
- }
- ScoreLab = Language.GetStr("UI", "D_ScoreLab");
- TimerBk.fillAmount = 0;
- TimerLab.text = GameTime.ToString("0");
- ManaReso.Get("C_MiniGame").TweenBacCG();
- ManaReso.SetActive("D_Rip1", false);
- ManaReso.SetActive("D_Begin", true);
- ManaReso.SetActive("D_Water1", false);
- ManaReso.SetActive("D_Fertilize1", false);
- }
- public static void GameBegin()
- {
- Game = true;
- MiniGameIndex++;
- OpTimer = OpTime;
- GoldTimer = Random.Range(3f, 6f);
- GameTimer = 0;
- NewOpTime = OpTime;
- DiamondTimer = Random.Range(0f, GameTime - 5);
- ManaDebug.Log(string.Format("第<color=red>{0}</color>次小游戏", MiniGameIndex));
- for (int i = 0; i < IdleList.Count; i++)
- {
- IdleList[i].GameBegin();
- }
- if (Random.Range(5, 9) <= MiniGameIndex)
- {
- MiniGameIndex = 0;
- DropDiamond = true;
- }
- else
- {
- if (Random.Range(0, 1f) <= 0.01f)
- {
- DropDiamond = true;
- }
- else
- {
- DropDiamond = false;
- }
- }
- }
- public static void GamePrepare()
- {
- Prepare = true;
- PrepareTimer = 3;
- ManaReso.Get("D_Rip1").SetActive(true);
- ManaReso.Get("D_Water1").SetActive(true);
- ManaReso.Get("D_Fertilize1").SetActive(true);
- ManaReso.Get("D_Begin").SetActive(false);
- PrepareLab.StreamForScale();
- }
- #endregion
- public void OnApplicationPause(bool pause)
- {
- if (!pause)
- {
- if (!ManaTutorial.TutorialA)
- {
- if (Game || Prepare)
- {
- ManaReso.Get<Button>("D_Quit").onClick.Invoke();
- }
- }
- }
- }
- }
|