|
@@ -680,21 +680,26 @@ public class ManaMiniGame : Regist
|
|
|
public static Transform D_Begin;
|
|
|
public static Transform D_Status1;
|
|
|
public static Transform D_Status2;
|
|
|
+ public static Transform D_Status3;
|
|
|
public static Transform D_Operate1;
|
|
|
public static Transform D_Operate2;
|
|
|
+ public static Transform D_Operate3;
|
|
|
|
|
|
public static List<int> IndexList = new List<int>();
|
|
|
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 List<Flower> FadeList = new List<Flower>();
|
|
|
+ public static List<Flower> FlowerListC = new List<Flower>();
|
|
|
public static Dictionary<int, Flower> FlowerDic = new Dictionary<int, Flower>();
|
|
|
|
|
|
+ public static int FlowerID;
|
|
|
public static int MiniGameIndex;
|
|
|
public static string ScoreLab;
|
|
|
|
|
|
public static bool GameA;
|
|
|
public static bool GameB;
|
|
|
+ public static bool GameC;
|
|
|
public static bool Prepare;
|
|
|
public static bool FlowerLock;
|
|
|
public static bool TutorialLock = true;
|
|
@@ -870,10 +875,13 @@ public class ManaMiniGame : Regist
|
|
|
D_Grid = ManaReso.Get("D_Grid");
|
|
|
D_Begin = ManaReso.Get("D_Begin");
|
|
|
D_Timer = ManaReso.Get("D_Timer");
|
|
|
+
|
|
|
D_Status1 = ManaReso.Get("D_Status1");
|
|
|
D_Status2 = ManaReso.Get("D_Status2");
|
|
|
+ D_Status3 = ManaReso.Get("D_Status3");
|
|
|
D_Operate1 = ManaReso.Get("D_Operate1");
|
|
|
D_Operate2 = ManaReso.Get("D_Operate2");
|
|
|
+ D_Operate3 = ManaReso.Get("D_Operate3");
|
|
|
|
|
|
TimerLab = ManaReso.Get<Text>("D_TimerLab");
|
|
|
PrepareLab = ManaReso.Get<Text>("D_PrepareLab");
|
|
@@ -929,9 +937,9 @@ public class ManaMiniGame : Regist
|
|
|
EventType.BackwardFinish,
|
|
|
() =>
|
|
|
{
|
|
|
- RoundEnd();
|
|
|
- RoundReset();
|
|
|
- RoundBegin();
|
|
|
+ RoundEndB();
|
|
|
+ RoundResetB();
|
|
|
+ RoundBeginB();
|
|
|
}
|
|
|
);
|
|
|
}
|
|
@@ -1068,7 +1076,7 @@ public class ManaMiniGame : Regist
|
|
|
|
|
|
if (FadeList.Count == 6)
|
|
|
{
|
|
|
- RoundBegin();
|
|
|
+ RoundBeginB();
|
|
|
}
|
|
|
|
|
|
break;
|
|
@@ -1080,32 +1088,72 @@ public class ManaMiniGame : Regist
|
|
|
{
|
|
|
GameA = false;
|
|
|
GameB = false;
|
|
|
+ GameC = false;
|
|
|
|
|
|
D_Operate1.SetActive(false);
|
|
|
D_Operate2.SetActive(false);
|
|
|
+ D_Operate3.SetActive(false);
|
|
|
+
|
|
|
+ bool gameAvailibleB = ManaCenter.Level >= 18;
|
|
|
+ bool gameAvailibleC = ManaGarden.MyFlower >= 2;
|
|
|
|
|
|
- if (ManaCenter.Level >= 18)
|
|
|
+ float thresholdA;
|
|
|
+ float thresholdB;
|
|
|
+ float thresholdC;
|
|
|
+
|
|
|
+ if (gameAvailibleB && gameAvailibleC)
|
|
|
{
|
|
|
- if (ManaTutorial.TutorialB)
|
|
|
- {
|
|
|
- GameB = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (Random.Range(0f, 1f) <= 0.5f)
|
|
|
- {
|
|
|
- GameB = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- GameA = true;
|
|
|
- }
|
|
|
- }
|
|
|
+ thresholdA = 0.33f;
|
|
|
+ thresholdB = 0.66f;
|
|
|
+ thresholdC = 1f;
|
|
|
+ }
|
|
|
+ else if (gameAvailibleB)
|
|
|
+ {
|
|
|
+ thresholdA = 0.5f;
|
|
|
+ thresholdB = 1;
|
|
|
+ thresholdC = 0;
|
|
|
+ }
|
|
|
+ else if (gameAvailibleC)
|
|
|
+ {
|
|
|
+ thresholdA = 0.5f;
|
|
|
+ thresholdB = 0;
|
|
|
+ thresholdC = 1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ thresholdA = 1;
|
|
|
+ thresholdB = 0;
|
|
|
+ thresholdC = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ float posibility = Random.Range(0f, 1f);
|
|
|
+
|
|
|
+ if (posibility <= thresholdA)
|
|
|
+ {
|
|
|
GameA = true;
|
|
|
}
|
|
|
+ else if (posibility <= thresholdB)
|
|
|
+ {
|
|
|
+ GameB = true;
|
|
|
+ }
|
|
|
+ else if (posibility <= thresholdC)
|
|
|
+ {
|
|
|
+ GameC = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ManaTutorial.TutorialB)
|
|
|
+ {
|
|
|
+ GameA = false;
|
|
|
+ GameB = true;
|
|
|
+ GameC = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ManaTutorial.TutorialE)
|
|
|
+ {
|
|
|
+ GameA = false;
|
|
|
+ GameB = false;
|
|
|
+ GameC = true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static void InitializeAward()
|
|
@@ -1232,7 +1280,12 @@ public class ManaMiniGame : Regist
|
|
|
if (GameB)
|
|
|
{
|
|
|
GameEnterB();
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (GameC)
|
|
|
+ {
|
|
|
+ GameEnterC();
|
|
|
+ }
|
|
|
|
|
|
ScoreLab = Language.GetStr("UI", "D_ScoreLab");
|
|
|
|
|
@@ -1399,6 +1452,50 @@ public class ManaMiniGame : Regist
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static void GameEnterC()
|
|
|
+ {
|
|
|
+ D_Operate3.SetActive(true);
|
|
|
+
|
|
|
+ ManaReso.SetActive("D_Begin", true);
|
|
|
+ ManaReso.SetActive("D_DescB", true);
|
|
|
+
|
|
|
+ D_Begin.SetParent(D_Operate3);
|
|
|
+ D_Timer.SetParent(D_Status3);
|
|
|
+ D_Grid.SetParent(D_Status3);
|
|
|
+
|
|
|
+ PrepareLab.SetParent(ManaReso.Get("D_PrepareLayout3"));
|
|
|
+
|
|
|
+
|
|
|
+ FlowerListC = new List<Flower>();
|
|
|
+
|
|
|
+ List<int> slotList = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
|
|
|
+
|
|
|
+
|
|
|
+ FlowerInfo flowerInfo = ManaGarden.FlowerInfoDic.Random(false, flowerIndo => { return flowerIndo.Unlock; });
|
|
|
+
|
|
|
+ FlowerID = flowerInfo.ID_;
|
|
|
+
|
|
|
+ FlowerListC.Add(ManaReso.GetFlower(flowerInfo, ManaReso.Get("SlotMini" + slotList.Random(true))));
|
|
|
+
|
|
|
+ while (slotList.Count > 0)
|
|
|
+ {
|
|
|
+ flowerInfo = ManaGarden.FlowerInfoDic.Random(false, flowerIndo => { return flowerIndo.Unlock; });
|
|
|
+
|
|
|
+ for (int i = 0; i < Mathf.Min(Random.Range(2, 9), slotList.Count); i++)
|
|
|
+ {
|
|
|
+ FlowerListC.Add(ManaReso.GetFlower(flowerInfo, ManaReso.Get("SlotMini" + slotList.Random(true))));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ for (int i = 0; i < FlowerListC.Count; i++)
|
|
|
+ {
|
|
|
+ FlowerListC[i].FlowerIcon.CreateTweenSr(1, 0, 0.25f, true, false, Curve.EaseOutQuad, false, true);
|
|
|
+
|
|
|
+ FlowerListC[i].FlowerIcon.GetTweenSr().InDestination = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public static void GameBegin()
|
|
|
{
|
|
|
Game = true;
|
|
@@ -1424,7 +1521,12 @@ public class ManaMiniGame : Regist
|
|
|
|
|
|
if (GameB)
|
|
|
{
|
|
|
- RoundReset();
|
|
|
+ RoundResetB();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (GameC)
|
|
|
+ {
|
|
|
+ RoundBeginC();
|
|
|
}
|
|
|
|
|
|
if (Random.Range(5, 9) <= MiniGameIndex)
|
|
@@ -1454,10 +1556,10 @@ public class ManaMiniGame : Regist
|
|
|
ManaReso.Get("D_Begin").SetActive(false);
|
|
|
ManaReso.Get("D_DescA").SetActive(false);
|
|
|
ManaReso.Get("D_DescB").SetActive(false);
|
|
|
+ ManaReso.Get("D_DescC").SetActive(false);
|
|
|
|
|
|
if (GameA)
|
|
|
{
|
|
|
-
|
|
|
ManaReso.Get("D_Rip1").SetActive(true);
|
|
|
ManaReso.Get("D_Water1").SetActive(true);
|
|
|
ManaReso.Get("D_Fertilize1").SetActive(true);
|
|
@@ -1486,12 +1588,12 @@ public class ManaMiniGame : Regist
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static void RoundEnd()
|
|
|
+ public static void RoundEndB()
|
|
|
{
|
|
|
ManaReso.Get("D_Mask").TweenForGra();
|
|
|
}
|
|
|
|
|
|
- public static void RoundReset()
|
|
|
+ public static void RoundResetB()
|
|
|
{
|
|
|
for (int i = 0; i < FadeList.Count; i++)
|
|
|
{
|
|
@@ -1520,7 +1622,7 @@ public class ManaMiniGame : Regist
|
|
|
ResetOprerate();
|
|
|
}
|
|
|
|
|
|
- public static void RoundBegin()
|
|
|
+ public static void RoundBeginB()
|
|
|
{
|
|
|
ManaReso.Get("D_Mask").TweenBacGra();
|
|
|
|
|
@@ -1531,6 +1633,29 @@ public class ManaMiniGame : Regist
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public static void RoundEndC()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void RoundResetC()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void RoundBeginC()
|
|
|
+ {
|
|
|
+ ManaReso.Get("D_FlowerBtn7").TweenReForCG();
|
|
|
+ ManaReso.Get("D_FlowerBtn8").TweenReForCG();
|
|
|
+ ManaReso.Get("D_FlowerBtn9").TweenReForCG();
|
|
|
+
|
|
|
+ for (int i = 0; i < FlowerListC.Count; i++)
|
|
|
+ {
|
|
|
+ FlowerListC[i].FlowerIcon.TweenBacSr();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public static int IndexMap(int slotIndex)
|
|
|
{
|
|
|
if (slotIndex == 1)
|