|
@@ -615,7 +615,8 @@ public enum MiniGameType
|
|
|
None, //需要重置
|
|
|
Punch, //打地鼠
|
|
|
Memory, //记住花的消失顺序
|
|
|
- Find, //找落单的花
|
|
|
+ FindSolo, //找落单的花
|
|
|
+ FindMissing, //找不见了的花
|
|
|
}
|
|
|
|
|
|
public class MiniGameManager : Regist
|
|
@@ -734,11 +735,13 @@ public class MiniGameManager : Regist
|
|
|
public static Transform MinigameBeginButtonParent;
|
|
|
public static Transform PunchGameStatusParent;
|
|
|
public static Transform MemoryGameStatusParent;
|
|
|
- public static Transform FindGameStatusParent;
|
|
|
+ public static Transform FindSoloGameStatusParent;
|
|
|
+ public static Transform FindMissingGameStatusParent;
|
|
|
public static Transform PunchGameOperateParent;
|
|
|
public static Transform MemoryGameOperateParent;
|
|
|
- public static Transform FindGameOperateParent;
|
|
|
- public static Transform FindGameCorrectButtonParent;
|
|
|
+ public static Transform FindSoloGameOperateParent;
|
|
|
+ public static Transform FindSoloGameCorrectButtonParent;
|
|
|
+ public static Transform FindMissingGameOperateParent;
|
|
|
|
|
|
public static List<Drop> DropAwardList = new List<Drop>();
|
|
|
public static List<Flower> MinigameIdleFlowerList = new List<Flower>();
|
|
@@ -750,12 +753,29 @@ public class MiniGameManager : Regist
|
|
|
public static List<int> PunchGameSlotIDs = new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
|
|
|
public static List<Flower> PunchGameOperateList = new List<Flower>();
|
|
|
|
|
|
- public static int MaxFadeAmt = 6;
|
|
|
- public static int FindCorrectScore = 40;
|
|
|
- public static List<int> FindGameSlotIDs = new List<int> {0, 1, 2, 3, 4, 5, 6, 7, 8};
|
|
|
- public static List<int> FindGameIndexList = new List<int>();
|
|
|
- public static List<int> FindGameFlowerIDs = new List<int>();
|
|
|
-
|
|
|
+ public static int FindSoloCorrectScore = 40;
|
|
|
+ public static List<int> FindSoloGameSlotIDs = new List<int> {0, 1, 2, 3, 4, 5, 6, 7, 8};
|
|
|
+ public static List<int> FindSoloGameIndexList = new List<int>();
|
|
|
+ public static List<int> FindSoloGameFlowerIDs = new List<int>();
|
|
|
+
|
|
|
+
|
|
|
+ public static Flower FindMissingNewFlower;
|
|
|
+ public static Flower FindMissingCorrectFlower;
|
|
|
+ public static int FindMissingCorrectScore = 40;
|
|
|
+ public static float FindMissingGameFadeTimer;
|
|
|
+ public static float FindMissingGameCurrentFadeTime;
|
|
|
+ public static float FindMissingGameDecreaseTime = 0.5f;
|
|
|
+ public static float FindMissingGameFlowerDisappearTime = 0.5f;
|
|
|
+ public static float FindMissingGameFlowerMinDisplayTime = 1f;
|
|
|
+ public static float FindMissingGameFlowerMaxDisplayTime = 3f;
|
|
|
+ public static List<int> FindMissingGameSlotIDs = new List<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
|
|
|
+ public static List<int> FindMissingGameFlowerIDs = new List<int>();
|
|
|
+ public static Transform FindMissingGameMask;
|
|
|
+
|
|
|
+ public static float MemoryGameFlowerFadeTime = 2f;
|
|
|
+ public static float MemoryGameFlowerFadeTimer;
|
|
|
+ public static float MemoryGameCurrentFlowerFadeTime;
|
|
|
+ public static int MemoryGameMaxFadeAmt = 6;
|
|
|
public static int MemoryCorrectScore = 20;
|
|
|
public static float MemoryGameDecreaseRate = 0.3f;
|
|
|
public static List<int> MemoryGameSlotIDs = new List<int> { 0, 1, 3, 4, 6, 7 };
|
|
@@ -782,10 +802,6 @@ public class MiniGameManager : Regist
|
|
|
public static float DropDiamondTimer;
|
|
|
public static bool CreateDropDiamondFlag;
|
|
|
|
|
|
- public static float FlowerFadeTime = 2f;
|
|
|
- public static float FlowerFadeTimer;
|
|
|
- public static float CurrentFlowerFadeTime;
|
|
|
-
|
|
|
public static float PanaltyTime = 1f;
|
|
|
public static float PanaltyTimer;
|
|
|
|
|
@@ -803,9 +819,12 @@ public class MiniGameManager : Regist
|
|
|
public static List<Transform> D_MemoryGameIcons = new List<Transform>();
|
|
|
public static List<Transform> D_MemoryGameTicks = new List<Transform>();
|
|
|
public static List<Transform> D_MemoryGameArrows = new List<Transform>();
|
|
|
- public static List<Transform> D_FindGameBtns = new List<Transform>();
|
|
|
- public static List<Transform> D_FindGameIcons = new List<Transform>();
|
|
|
- public static List<Transform> D_FindGameArrows = new List<Transform>();
|
|
|
+ public static List<Transform> D_FindSoloGameBtns = new List<Transform>();
|
|
|
+ public static List<Transform> D_FindSoloGameIcons = new List<Transform>();
|
|
|
+ public static List<Transform> D_FindSoloGameArrows = new List<Transform>();
|
|
|
+ public static List<Transform> D_FindMissingGameBtns = new List<Transform>();
|
|
|
+ public static List<Transform> D_FindMissingGameIcons = new List<Transform>();
|
|
|
+ public static List<Transform> D_FindMissingGameArrows = new List<Transform>();
|
|
|
public static List<Transform> MinigameSlots = new List<Transform>();
|
|
|
|
|
|
public static MinigameAward MinigameAward;
|
|
@@ -825,7 +844,9 @@ public class MiniGameManager : Regist
|
|
|
|
|
|
MemoryGameThread();
|
|
|
|
|
|
- FindGameThread();
|
|
|
+ FindSoloGameThread();
|
|
|
+
|
|
|
+ FindMissingGameThread();
|
|
|
}
|
|
|
|
|
|
if (IsPrepare)
|
|
@@ -903,13 +924,13 @@ public class MiniGameManager : Regist
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (MemoryGameFadeList.Count < MaxFadeAmt)
|
|
|
+ if (MemoryGameFadeList.Count < MemoryGameMaxFadeAmt)
|
|
|
{
|
|
|
- FlowerFadeTimer -= Time.deltaTime;
|
|
|
+ MemoryGameFlowerFadeTimer -= Time.deltaTime;
|
|
|
|
|
|
- if (FlowerFadeTimer <= 0)
|
|
|
+ if (MemoryGameFlowerFadeTimer <= 0)
|
|
|
{
|
|
|
- FlowerFadeTimer = CurrentFlowerFadeTime;
|
|
|
+ MemoryGameFlowerFadeTimer = MemoryGameCurrentFlowerFadeTime;
|
|
|
|
|
|
MemoryGameFadeNext();
|
|
|
}
|
|
@@ -918,9 +939,38 @@ public class MiniGameManager : Regist
|
|
|
DropAwardThread();
|
|
|
}
|
|
|
|
|
|
- private void FindGameThread()
|
|
|
+ private void FindSoloGameThread()
|
|
|
+ {
|
|
|
+ if (miniGameType != MiniGameType.FindSolo)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ GameTimer += Time.deltaTime;
|
|
|
+
|
|
|
+ if (GameTimer >= GameTime)
|
|
|
+ {
|
|
|
+ GameOver();
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (Panalty)
|
|
|
+ {
|
|
|
+ PanaltyTimer -= Time.deltaTime;
|
|
|
+
|
|
|
+ if (PanaltyTimer <= 0)
|
|
|
+ {
|
|
|
+ Panalty = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ DropAwardThread();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void FindMissingGameThread()
|
|
|
{
|
|
|
- if (miniGameType != MiniGameType.Find)
|
|
|
+ if (miniGameType != MiniGameType.FindMissing)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
@@ -944,9 +994,20 @@ public class MiniGameManager : Regist
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (FindMissingGameFadeTimer >= 0)
|
|
|
+ {
|
|
|
+ FindMissingGameFadeTimer -= Time.deltaTime;
|
|
|
+
|
|
|
+ if (FindMissingGameFadeTimer <= 0)
|
|
|
+ {
|
|
|
+ FindMissingFadeFlowers();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
DropAwardThread();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
private void DropAwardThread()
|
|
|
{
|
|
|
DropGoldTimer -= Time.deltaTime;
|
|
@@ -999,10 +1060,15 @@ public class MiniGameManager : Regist
|
|
|
|
|
|
PunchGameStatusParent = ResourceManager.Get(CanvasLabel.D_Status1);
|
|
|
MemoryGameStatusParent = ResourceManager.Get(CanvasLabel.D_Status2);
|
|
|
- FindGameStatusParent = ResourceManager.Get(CanvasLabel.D_Status3);
|
|
|
+ FindSoloGameStatusParent = ResourceManager.Get(CanvasLabel.D_Status3);
|
|
|
+ FindMissingGameStatusParent = ResourceManager.Get(CanvasLabel.D_FindMissingGameStatus);
|
|
|
PunchGameOperateParent = ResourceManager.Get(CanvasLabel.D_Operate1);
|
|
|
MemoryGameOperateParent = ResourceManager.Get(CanvasLabel.D_Operate2);
|
|
|
- FindGameOperateParent = ResourceManager.Get(CanvasLabel.D_Operate3);
|
|
|
+ FindSoloGameOperateParent = ResourceManager.Get(CanvasLabel.D_Operate3);
|
|
|
+ FindMissingGameOperateParent = ResourceManager.Get(CanvasLabel.D_FindMissingGamePanel);
|
|
|
+
|
|
|
+ FindMissingGameMask = ResourceManager.Get(CanvasLabel.D_FindMissingGameMask);
|
|
|
+ FindMissingGameMask.CreateTweenGra(0, 0.25f, true, false, Curve.EaseOutQuad);
|
|
|
|
|
|
MinigameTimerText = ResourceManager.Get<Text>(CanvasLabel.D_TimerLab);
|
|
|
PrepareText = ResourceManager.Get<Text>(CanvasLabel.D_PrepareLab);
|
|
@@ -1047,17 +1113,29 @@ public class MiniGameManager : Regist
|
|
|
D_MemoryGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FlowerArrow5));
|
|
|
D_MemoryGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FlowerArrow6));
|
|
|
|
|
|
- D_FindGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FlowerBtn7));
|
|
|
- D_FindGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FlowerBtn8));
|
|
|
- D_FindGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FlowerBtn9));
|
|
|
+ D_FindSoloGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FlowerBtn7));
|
|
|
+ D_FindSoloGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FlowerBtn8));
|
|
|
+ D_FindSoloGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FlowerBtn9));
|
|
|
|
|
|
- D_FindGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FlowerIcon7));
|
|
|
- D_FindGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FlowerIcon8));
|
|
|
- D_FindGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FlowerIcon9));
|
|
|
+ D_FindSoloGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FlowerIcon7));
|
|
|
+ D_FindSoloGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FlowerIcon8));
|
|
|
+ D_FindSoloGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FlowerIcon9));
|
|
|
|
|
|
- D_FindGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FlowerArrow7));
|
|
|
- D_FindGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FlowerArrow8));
|
|
|
- D_FindGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FlowerArrow9));
|
|
|
+ D_FindSoloGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FlowerArrow7));
|
|
|
+ D_FindSoloGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FlowerArrow8));
|
|
|
+ D_FindSoloGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FlowerArrow9));
|
|
|
+
|
|
|
+ D_FindMissingGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameButton0));
|
|
|
+ D_FindMissingGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameButton1));
|
|
|
+ D_FindMissingGameBtns.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameButton2));
|
|
|
+
|
|
|
+ D_FindMissingGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameIcon0));
|
|
|
+ D_FindMissingGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameIcon1));
|
|
|
+ D_FindMissingGameIcons.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameIcon2));
|
|
|
+
|
|
|
+ D_FindMissingGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameArrow0));
|
|
|
+ D_FindMissingGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameArrow1));
|
|
|
+ D_FindMissingGameArrows.Add(ResourceManager.Get(CanvasLabel.D_FindMissingGameArrow2));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1096,70 +1174,39 @@ public class MiniGameManager : Regist
|
|
|
{
|
|
|
PunchGameOperateParent.SetActive(false);
|
|
|
MemoryGameOperateParent.SetActive(false);
|
|
|
- FindGameOperateParent.SetActive(false);
|
|
|
+ FindSoloGameOperateParent.SetActive(false);
|
|
|
+ FindMissingGameOperateParent.SetActive(false);
|
|
|
|
|
|
bool memoryGameAvailable = Manager.GardenLevel >= TutorialManager.MemoryMinigameTutorialLevel;
|
|
|
- bool findGameAvailable = GardenManager.TotalUnlockFlower >= TutorialManager.MinFlowerForFindGame && Manager.GardenLevel >= TutorialManager.FindMinigameTutorialLevel;
|
|
|
+ bool findSoloGameAvailable = GardenManager.TotalUnlockFlower >= TutorialManager.MinFlowerForFindSoloGame && Manager.GardenLevel >= TutorialManager.FindSoloMinigameTutorialLevel;
|
|
|
+ bool findMissingGameAvailable = GardenManager.TotalUnlockFlower >= TutorialManager.MinFlowerForFindMissingGame && Manager.GardenLevel >= TutorialManager.FindMissingMinigameTutorialLevel;
|
|
|
+
|
|
|
availableGameTypes.Add(MiniGameType.Punch);
|
|
|
if (memoryGameAvailable)
|
|
|
{
|
|
|
availableGameTypes.Add(MiniGameType.Memory);
|
|
|
}
|
|
|
- if (findGameAvailable)
|
|
|
- {
|
|
|
- availableGameTypes.Add(MiniGameType.Find);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- float punchGameThreshold;
|
|
|
- float memoryGameThreshold;
|
|
|
- float findGameThreshold;
|
|
|
-
|
|
|
- if (memoryGameAvailable && findGameAvailable)
|
|
|
- {
|
|
|
- punchGameThreshold = 0.33f;
|
|
|
- memoryGameThreshold = 0.66f;
|
|
|
- findGameThreshold = 1f;
|
|
|
- }
|
|
|
- else if (memoryGameAvailable)
|
|
|
- {
|
|
|
- punchGameThreshold = 0.5f;
|
|
|
- memoryGameThreshold = 1;
|
|
|
- findGameThreshold = 0;
|
|
|
- }
|
|
|
- else if (findGameAvailable)
|
|
|
+ if (findSoloGameAvailable)
|
|
|
{
|
|
|
- punchGameThreshold = 0.5f;
|
|
|
- memoryGameThreshold = 0;
|
|
|
- findGameThreshold = 1;
|
|
|
+ availableGameTypes.Add(MiniGameType.FindSolo);
|
|
|
}
|
|
|
- else
|
|
|
+ if (findMissingGameAvailable)
|
|
|
{
|
|
|
- punchGameThreshold = 1;
|
|
|
- memoryGameThreshold = 0;
|
|
|
- findGameThreshold = 0;
|
|
|
+ availableGameTypes.Add(MiniGameType.FindMissing);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
float posibility = Random.Range(0f, 1f);
|
|
|
-
|
|
|
- if (posibility <= punchGameThreshold)
|
|
|
- {
|
|
|
- miniGameType = MiniGameType.Punch;
|
|
|
- }
|
|
|
- else if (posibility <= memoryGameThreshold)
|
|
|
+ for (int i = 0; i < availableGameTypes.Count; i++)
|
|
|
{
|
|
|
- miniGameType = MiniGameType.Memory;
|
|
|
- }
|
|
|
- else if (posibility <= findGameThreshold)
|
|
|
- {
|
|
|
- miniGameType = MiniGameType.Find;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- throw new Exception();
|
|
|
+ float average = 1f/availableGameTypes.Count;
|
|
|
+ float leftBorder = average*i;
|
|
|
+ float rightBorder = average*(i+1);
|
|
|
+ if (posibility >= leftBorder && posibility <= rightBorder)
|
|
|
+ {
|
|
|
+ return availableGameTypes[i];
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- return miniGameType;
|
|
|
+ return MiniGameType.Punch;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1179,9 +1226,14 @@ public class MiniGameManager : Regist
|
|
|
EnterMemoryGame();
|
|
|
}
|
|
|
|
|
|
- if (miniGameType == MiniGameType.Find)
|
|
|
+ if (miniGameType == MiniGameType.FindSolo)
|
|
|
+ {
|
|
|
+ EnterFindSoloGame();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (miniGameType == MiniGameType.FindMissing)
|
|
|
{
|
|
|
- EnterFindGame();
|
|
|
+ EnterFindMissingGame();
|
|
|
}
|
|
|
|
|
|
ScoreTextPrefix = Language.GetStr(LanguageLabel.UI__D_ScoreLab);
|
|
@@ -1205,11 +1257,12 @@ public class MiniGameManager : Regist
|
|
|
Score = 0;
|
|
|
|
|
|
CreateOperateTimer = CreateOperateTime;
|
|
|
- FlowerFadeTimer = FlowerFadeTime;
|
|
|
+ MemoryGameFlowerFadeTimer = MemoryGameFlowerFadeTime;
|
|
|
+ FindMissingGameCurrentFadeTime = FindMissingGameFlowerMaxDisplayTime;
|
|
|
DropGoldTimer = Random.Range(DropGoldMinIndex, DropGoldMaxIndex);
|
|
|
GameTimer = 0;
|
|
|
CurrentCreateOperateTime = CreateOperateTime;
|
|
|
- CurrentFlowerFadeTime = FlowerFadeTime;
|
|
|
+ MemoryGameCurrentFlowerFadeTime = MemoryGameFlowerFadeTime;
|
|
|
DropDiamondTimer = Random.Range(0f, GameTime - DropDiamondOffsetTime);
|
|
|
|
|
|
StaticsManager.GetInstance().UseItem(StaticsManager.ItemID.开始小游戏, StaticsManager.ItemType.小游戏, "1", StaticsManager.ConsumeModule.None);
|
|
@@ -1227,9 +1280,14 @@ public class MiniGameManager : Regist
|
|
|
MemoryGameRoundReset();
|
|
|
}
|
|
|
|
|
|
- if (miniGameType == MiniGameType.Find)
|
|
|
+ if (miniGameType == MiniGameType.FindSolo)
|
|
|
{
|
|
|
- FindGameRoundBegin(true);
|
|
|
+ FindSoloGameRoundBegin(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (miniGameType == MiniGameType.FindMissing)
|
|
|
+ {
|
|
|
+ FindMissingGameRoundBegin();
|
|
|
}
|
|
|
|
|
|
if (Random.Range(DropDiamondMinIndex, DropDiamondMaxIndex) <= MiniGameIndex)
|
|
@@ -1260,6 +1318,7 @@ public class MiniGameManager : Regist
|
|
|
ResourceManager.Get(CanvasLabel.D_DescA).SetActive(false);
|
|
|
ResourceManager.Get(CanvasLabel.D_DescB).SetActive(false);
|
|
|
ResourceManager.Get(CanvasLabel.D_DescC).SetActive(false);
|
|
|
+ ResourceManager.Get(CanvasLabel.D_FindMissingGameDesc).SetActive(false);
|
|
|
|
|
|
if (miniGameType == MiniGameType.Punch)
|
|
|
{
|
|
@@ -1352,7 +1411,7 @@ public class MiniGameManager : Regist
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static void OnFindGameButtonClick(int id, int btnIndex)
|
|
|
+ public static void OnFindSoloGameButtonClick(int id, int btnIndex)
|
|
|
{
|
|
|
if (!Game)
|
|
|
{
|
|
@@ -1364,27 +1423,27 @@ public class MiniGameManager : Regist
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (FindGameFlowerIDs[0] == id)
|
|
|
+ if (FindSoloGameFlowerIDs[0] == id)
|
|
|
{
|
|
|
Flower flower = MinigameIdleFlowerList.Find(tempFlower => { return tempFlower.ID == id; });
|
|
|
|
|
|
- ResourceManager.GetHudText($"+{FindCorrectScore}", Color.white, 90, flower.ChildDic[FlowerLabel.ScorePos], ResourceManager.Get(CanvasLabel.D_HudParent), true);
|
|
|
+ ResourceManager.GetHudText($"+{FindSoloCorrectScore}", Color.white, 90, flower.ChildDic[FlowerLabel.ScorePos], ResourceManager.Get(CanvasLabel.D_HudParent), true);
|
|
|
|
|
|
- Score += FindCorrectScore;
|
|
|
+ Score += FindSoloCorrectScore;
|
|
|
|
|
|
flower.PlayFlashLight();
|
|
|
|
|
|
AudioManager.PlayClip(AudioLabel.ClickButton);
|
|
|
|
|
|
- FindGameRoundEnd();
|
|
|
+ FindSoloGameRoundEnd();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
Panalty = true;
|
|
|
PanaltyTimer = PanaltyTime;
|
|
|
|
|
|
- D_FindGameIcons[btnIndex].TweenForGra();
|
|
|
- D_FindGameBtns[btnIndex].Shake(0.5f, 3, new Vector3(20f, 0, 0), Curve.EaseOutQuad);
|
|
|
+ D_FindSoloGameIcons[btnIndex].TweenForGra();
|
|
|
+ D_FindSoloGameBtns[btnIndex].Shake(0.5f, 3, new Vector3(20f, 0, 0), Curve.EaseOutQuad);
|
|
|
|
|
|
AudioManager.PlayClip(AudioLabel.Error);
|
|
|
}
|
|
@@ -1397,20 +1456,20 @@ public class MiniGameManager : Regist
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if (FindGameIndexList.Count == 0)
|
|
|
+ if (FindSoloGameIndexList.Count == 0)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (slotIndex == FindGameIndexList[0])
|
|
|
+ if (slotIndex == FindSoloGameIndexList[0])
|
|
|
{
|
|
|
D_MemoryGameBtns[index].GetComponent<Image>().material = Lib.GrayMat;
|
|
|
D_MemoryGameBtns[index].GetComponent<Button>().interactable = false;
|
|
|
D_MemoryGameIcons[index].GetComponent<Image>().material = Lib.GrayMat;
|
|
|
D_MemoryGameTicks[index].SetActive(true);
|
|
|
|
|
|
- FindGameIndexList.RemoveAt(0);
|
|
|
+ FindSoloGameIndexList.RemoveAt(0);
|
|
|
|
|
|
|
|
|
Flower flower = MinigameFlowerDictionary[slotIndex];
|
|
@@ -1433,7 +1492,7 @@ public class MiniGameManager : Regist
|
|
|
|
|
|
TweenRoot tween = flower.FlowerIcon.TweenBacSr();
|
|
|
|
|
|
- if (FindGameIndexList.Count == 0)
|
|
|
+ if (FindSoloGameIndexList.Count == 0)
|
|
|
{
|
|
|
tween.AddEventOnetime
|
|
|
(
|
|
@@ -1692,9 +1751,9 @@ public class MiniGameManager : Regist
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static void EnterFindGame()
|
|
|
+ public static void EnterFindSoloGame()
|
|
|
{
|
|
|
- FindGameOperateParent.SetActive(true);
|
|
|
+ FindSoloGameOperateParent.SetActive(true);
|
|
|
|
|
|
ResourceManager.SetActive(CanvasLabel.D_Begin, true);
|
|
|
ResourceManager.SetActive(CanvasLabel.D_DescC, true);
|
|
@@ -1703,13 +1762,32 @@ public class MiniGameManager : Regist
|
|
|
ResourceManager.SetActive(CanvasLabel.D_FlowerBtn8, false);
|
|
|
ResourceManager.SetActive(CanvasLabel.D_FlowerBtn9, false);
|
|
|
|
|
|
- MinigameBeginButtonParent.SetParent(FindGameOperateParent);
|
|
|
- MinigameTimerParent.SetParent(FindGameStatusParent);
|
|
|
- DisplayGrid.SetParent(FindGameStatusParent);
|
|
|
+ MinigameBeginButtonParent.SetParent(FindSoloGameOperateParent);
|
|
|
+ MinigameTimerParent.SetParent(FindSoloGameStatusParent);
|
|
|
+ DisplayGrid.SetParent(FindSoloGameStatusParent);
|
|
|
|
|
|
PrepareText.SetParent(ResourceManager.Get(CanvasLabel.D_PrepareLayout3));
|
|
|
|
|
|
- FindGameRoundReset(true);
|
|
|
+ FindSoloGameRoundReset(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void EnterFindMissingGame()
|
|
|
+ {
|
|
|
+ FindMissingGameOperateParent.SetActive(true);
|
|
|
+ MinigameTimerParent.SetParent(FindMissingGameStatusParent);
|
|
|
+ DisplayGrid.SetParent(FindMissingGameStatusParent);
|
|
|
+ MinigameBeginButtonParent.SetParent(FindMissingGameOperateParent);
|
|
|
+ PrepareText.SetParent(ResourceManager.Get(CanvasLabel.D_FindMissingGamePrepareLayout));
|
|
|
+ ResourceManager.Get(CanvasLabel.D_FindMissingGameMask).GetTweenGra().InDestination = true;
|
|
|
+ for (int i = 0; i < D_FindMissingGameBtns.Count; i++)
|
|
|
+ {
|
|
|
+ D_FindMissingGameBtns[i].GetTweenCG().InOrigin = true;
|
|
|
+ D_FindMissingGameBtns[i].SetActive(false);
|
|
|
+ }
|
|
|
+ ResourceManager.SetActive(CanvasLabel.D_Begin, true);
|
|
|
+ ResourceManager.SetActive(CanvasLabel.D_FindMissingGameDesc, true);
|
|
|
+
|
|
|
+ FindMissingGameRoundReset(true);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1726,20 +1804,20 @@ public class MiniGameManager : Regist
|
|
|
}
|
|
|
|
|
|
|
|
|
- CurrentFlowerFadeTime -= CurrentFlowerFadeTime * MemoryGameDecreaseRate;
|
|
|
+ MemoryGameCurrentFlowerFadeTime -= MemoryGameCurrentFlowerFadeTime * MemoryGameDecreaseRate;
|
|
|
|
|
|
- FlowerFadeTimer = CurrentFlowerFadeTime;
|
|
|
+ MemoryGameFlowerFadeTimer = MemoryGameCurrentFlowerFadeTime;
|
|
|
|
|
|
|
|
|
MemoryGameFadeList = new List<Flower>();
|
|
|
|
|
|
- FindGameIndexList = new List<int>();
|
|
|
+ FindSoloGameIndexList = new List<int>();
|
|
|
|
|
|
List<int> randomList = new List<int>(MemoryGameSlotIDs);
|
|
|
|
|
|
for (int i = 0; i < randomList.Count; i++)
|
|
|
{
|
|
|
- FindGameIndexList.Add(randomList.Random(1, true, true)[0]);
|
|
|
+ FindSoloGameIndexList.Add(randomList.Random(1, true, true)[0]);
|
|
|
|
|
|
i--;
|
|
|
}
|
|
@@ -1790,9 +1868,9 @@ public class MiniGameManager : Regist
|
|
|
|
|
|
public static void MemoryGameFadeNext()
|
|
|
{
|
|
|
- for (int i = 0; i < FindGameIndexList.Count; i++)
|
|
|
+ for (int i = 0; i < FindSoloGameIndexList.Count; i++)
|
|
|
{
|
|
|
- Flower flower = MinigameFlowerDictionary[FindGameIndexList[i]];
|
|
|
+ Flower flower = MinigameFlowerDictionary[FindSoloGameIndexList[i]];
|
|
|
|
|
|
if (MemoryGameFadeList.UniqueAdd(flower))
|
|
|
{
|
|
@@ -1805,7 +1883,7 @@ public class MiniGameManager : Regist
|
|
|
|
|
|
flower.FlowerIcon.TweenForSr();
|
|
|
|
|
|
- if (MemoryGameFadeList.Count == MaxFadeAmt)
|
|
|
+ if (MemoryGameFadeList.Count == MemoryGameMaxFadeAmt)
|
|
|
{
|
|
|
MemoryGameRoundBegin();
|
|
|
}
|
|
@@ -1848,7 +1926,7 @@ public class MiniGameManager : Regist
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static void FindGameRoundEnd()
|
|
|
+ public static void FindSoloGameRoundEnd()
|
|
|
{
|
|
|
if (MinigameIdleFlowerList[0].ID == MinigameAward.UnlockFlowerID)
|
|
|
{
|
|
@@ -1871,24 +1949,24 @@ public class MiniGameManager : Regist
|
|
|
{
|
|
|
if (Game)
|
|
|
{
|
|
|
- FindGameRoundReset();
|
|
|
+ FindSoloGameRoundReset();
|
|
|
|
|
|
- FindGameRoundBegin();
|
|
|
+ FindSoloGameRoundBegin();
|
|
|
}
|
|
|
},
|
|
|
1.5f
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- public static void FindGameRoundReset(bool firstRound = false)
|
|
|
+ public static void FindSoloGameRoundReset(bool firstRound = false)
|
|
|
{
|
|
|
ExtList.ForEach(MinigameIdleFlowerList, flower => { flower.FlowerIcon.SetAlpha(1); flower.FlowerIcon.SetActive(true); flower.RetrieveFlower();});
|
|
|
|
|
|
MinigameIdleFlowerList = new List<Flower>();
|
|
|
|
|
|
- FindGameFlowerIDs = new List<int>();
|
|
|
+ FindSoloGameFlowerIDs = new List<int>();
|
|
|
|
|
|
- List<int> slotIDs = new List<int>(FindGameSlotIDs);
|
|
|
+ List<int> slotIDs = new List<int>(FindSoloGameSlotIDs);
|
|
|
|
|
|
|
|
|
FlowerInfo flowerInfo;
|
|
@@ -1902,24 +1980,24 @@ public class MiniGameManager : Regist
|
|
|
flowerInfo = GardenManager.FlowerInfoDictionary.Random(false, flowerIndo => { return flowerIndo.Unlock; });
|
|
|
}
|
|
|
|
|
|
- FindGameFlowerIDs.Add(flowerInfo.ID);
|
|
|
+ FindSoloGameFlowerIDs.Add(flowerInfo.ID);
|
|
|
|
|
|
MinigameIdleFlowerList.Add(ResourceManager.GetFlower(flowerInfo, MinigameSlots[slotIDs.Random(1, true, true)[0]]));
|
|
|
|
|
|
while (slotIDs.Count > 0)
|
|
|
{
|
|
|
- flowerInfo = GardenManager.FlowerInfoDictionary.Random(false, info => { return info.Unlock && info.ID != FindGameFlowerIDs[0]; });
|
|
|
+ flowerInfo = GardenManager.FlowerInfoDictionary.Random(false, info => { return info.Unlock && info.ID != FindSoloGameFlowerIDs[0]; });
|
|
|
|
|
|
if (slotIDs.Count == 1)
|
|
|
{
|
|
|
- if (!FindGameFlowerIDs.Contains(flowerInfo.ID))
|
|
|
+ if (!FindSoloGameFlowerIDs.Contains(flowerInfo.ID))
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- FindGameFlowerIDs.UniqueAdd(flowerInfo.ID);
|
|
|
+ FindSoloGameFlowerIDs.UniqueAdd(flowerInfo.ID);
|
|
|
}
|
|
|
|
|
|
int amt = Mathf.Min(Random.Range(2, 9), slotIDs.Count);
|
|
@@ -1940,20 +2018,20 @@ public class MiniGameManager : Regist
|
|
|
|
|
|
List<int> idList = new List<int>()
|
|
|
{
|
|
|
- FindGameFlowerIDs[0],
|
|
|
+ FindSoloGameFlowerIDs[0],
|
|
|
};
|
|
|
|
|
|
- if (FindGameFlowerIDs.Count == 2)
|
|
|
+ if (FindSoloGameFlowerIDs.Count == 2)
|
|
|
{
|
|
|
- idList.Add(FindGameFlowerIDs[1]);
|
|
|
- idList.Add(FindGameFlowerIDs[1]);
|
|
|
+ idList.Add(FindSoloGameFlowerIDs[1]);
|
|
|
+ idList.Add(FindSoloGameFlowerIDs[1]);
|
|
|
|
|
|
idList.RemoveAt(0);
|
|
|
- idList.Insert(Random.Range(0, 3), FindGameFlowerIDs[0]);
|
|
|
+ idList.Insert(Random.Range(0, 3), FindSoloGameFlowerIDs[0]);
|
|
|
}
|
|
|
- else if (FindGameFlowerIDs.Count > 2)
|
|
|
+ else if (FindSoloGameFlowerIDs.Count > 2)
|
|
|
{
|
|
|
- idList.AddRange(FindGameFlowerIDs.Random(2, true, false, id => { return id != idList[0]; }));
|
|
|
+ idList.AddRange(FindSoloGameFlowerIDs.Random(2, true, false, id => { return id != idList[0]; }));
|
|
|
|
|
|
idList = idList.Disturb();
|
|
|
}
|
|
@@ -1973,23 +2051,23 @@ public class MiniGameManager : Regist
|
|
|
int id = idList[i];
|
|
|
int index = i;
|
|
|
|
|
|
- if (firstRound && TutorialManager.FindMinigameTutorial && id == FindGameFlowerIDs[0])
|
|
|
+ if (firstRound && TutorialManager.FindSoloMinigameTutorial && id == FindSoloGameFlowerIDs[0])
|
|
|
{
|
|
|
- FindGameCorrectButtonParent = D_FindGameBtns[i];
|
|
|
- Button button = FindGameCorrectButtonParent.GetComponent<Button>();
|
|
|
+ FindSoloGameCorrectButtonParent = D_FindSoloGameBtns[i];
|
|
|
+ Button button = FindSoloGameCorrectButtonParent.GetComponent<Button>();
|
|
|
button.onClick.RemoveAllListeners();
|
|
|
- button.onClick.AddListener(() => { OnFindGameButtonClick(id, index); TutorialManager.EndClickCorrectButton(); });
|
|
|
+ button.onClick.AddListener(() => { OnFindSoloGameButtonClick(id, index); TutorialManager.EndClickFindSoloCorrectButton(); });
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- Button button = D_FindGameBtns[i].GetComponent<Button>();
|
|
|
+ Button button = D_FindSoloGameBtns[i].GetComponent<Button>();
|
|
|
button.onClick.RemoveAllListeners();
|
|
|
- button.onClick.AddListener(() => { OnFindGameButtonClick(id, index); });
|
|
|
+ button.onClick.AddListener(() => { OnFindSoloGameButtonClick(id, index); });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static void FindGameRoundBegin(bool firstRound = false)
|
|
|
+ public static void FindSoloGameRoundBegin(bool firstRound = false)
|
|
|
{
|
|
|
if (firstRound && !MinigameAward.HaveNewFlowerFlag)
|
|
|
{
|
|
@@ -2005,13 +2083,236 @@ public class MiniGameManager : Regist
|
|
|
MinigameIdleFlowerList[i].FlowerIcon.TweenBacSr();
|
|
|
}
|
|
|
|
|
|
- if (firstRound && TutorialManager.FindMinigameTutorial)
|
|
|
+ if (firstRound && TutorialManager.FindSoloMinigameTutorial)
|
|
|
{
|
|
|
- TutorialManager.ShowCorrectButton(FindGameCorrectButtonParent.GetChild(1), FindGameCorrectButtonParent);
|
|
|
+ TutorialManager.ShowFindSoloCorrectButton(FindSoloGameCorrectButtonParent.GetChild(1), FindSoloGameCorrectButtonParent);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public static void FindMissingGameRoundStartOperate()
|
|
|
+ {
|
|
|
+ List<Flower> flowers = new List<Flower>(MinigameIdleFlowerList);
|
|
|
+ flowers = flowers.Disturb();
|
|
|
+ for (int i = 1; i < flowers.Count; i++)
|
|
|
+ {
|
|
|
+ flowers[i].FlowerIcon.TweenBacSr();
|
|
|
+ }
|
|
|
+ List<Flower> buttonFlowers = new List<Flower>();
|
|
|
+ buttonFlowers.Add(flowers[0]);
|
|
|
+ for (int i = 1; i < flowers.Count; i++)
|
|
|
+ {
|
|
|
+ int index = i;
|
|
|
+ if (!buttonFlowers.MyContains(flower => flower.ID == flowers[index].ID))
|
|
|
+ {
|
|
|
+ buttonFlowers.Add(flowers[index]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<Image> icons = new List<Image>();
|
|
|
+ for (int i = 0; i < D_FindMissingGameIcons.Count; i++)
|
|
|
+ {
|
|
|
+ icons.Add(D_FindMissingGameIcons[i].GetComponent<Image>());
|
|
|
+ }
|
|
|
+ List<Button> buttons = new List<Button>();
|
|
|
+ for (int i = 0; i < D_FindMissingGameBtns.Count; i++)
|
|
|
+ {
|
|
|
+ buttons.Add(D_FindMissingGameBtns[i].GetComponent<Button>());
|
|
|
+ }
|
|
|
+ FindMissingCorrectFlower = buttonFlowers[0];
|
|
|
+ Image correctImage = icons.Random()[0];
|
|
|
+ int correctIndex = icons.IndexOf(correctImage);
|
|
|
+ Button correctButton = buttons[correctIndex];
|
|
|
+ icons.RemoveAt(correctIndex);
|
|
|
+ buttons.RemoveAt(correctIndex);
|
|
|
+ correctImage.sprite = buttonFlowers[0].FlowerInfo.Icon;
|
|
|
+ icons[0].sprite = buttonFlowers[1].FlowerInfo.Icon;
|
|
|
+ icons[1].sprite = buttonFlowers[2].FlowerInfo.Icon;
|
|
|
+ float deltaSIzeX = 1.0625f;
|
|
|
+ float deltaSIzeY = 1.0625f;
|
|
|
+ correctImage.Resize(true, deltaSIzeX, deltaSIzeY);
|
|
|
+ icons[0].Resize(true, deltaSIzeX, deltaSIzeY);
|
|
|
+ icons[1].Resize(true, deltaSIzeX, deltaSIzeY);
|
|
|
+ correctButton.TweenForCG();
|
|
|
+ buttons[0].TweenForCG();
|
|
|
+ buttons[1].TweenForCG();
|
|
|
+ correctButton.onClick.RemoveAllListeners();
|
|
|
+ buttons[0].onClick.RemoveAllListeners();
|
|
|
+ buttons[1].onClick.RemoveAllListeners();
|
|
|
+ correctButton.onClick.AddListener(() => OnFindMissingGameRightButtonClick(correctButton, correctImage));
|
|
|
+ buttons[0].onClick.AddListener(() => OnFindMissingGameWrongButtonClick(buttons[0], icons[0]));
|
|
|
+ buttons[1].onClick.AddListener(() => OnFindMissingGameWrongButtonClick(buttons[1], icons[1]));
|
|
|
+ if (TutorialManager.FindMissingMinigameTutorial)
|
|
|
+ {
|
|
|
+ TutorialManager.ShowFindMissingCorrectButton(D_FindMissingGameArrows[correctIndex], D_FindMissingGameBtns[correctIndex]);
|
|
|
+ correctButton.AddButtonEventOnetime(TutorialManager.EndClickFindMissingCorrectButton);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void FindMissingGameRoundEnd()
|
|
|
+ {
|
|
|
+ DelayCall.Call
|
|
|
+ (
|
|
|
+ 1f, () =>
|
|
|
+ {
|
|
|
+ FindMissingGameRoundReset(false);
|
|
|
+ FindMissingGameRoundBegin();
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void FindMissingGameRoundReset(bool firstRound)
|
|
|
+ {
|
|
|
+ if (!firstRound)
|
|
|
+ {
|
|
|
+ FindMissingGameCurrentFadeTime -= FindMissingGameDecreaseTime;
|
|
|
+ FindMissingGameCurrentFadeTime = Mathf.Max(FindMissingGameCurrentFadeTime, FindMissingGameFlowerMinDisplayTime);
|
|
|
+ for (int i = 0; i < MinigameIdleFlowerList.Count; i++)
|
|
|
+ {
|
|
|
+ MinigameIdleFlowerList[i].RetrieveFlower();
|
|
|
+ }
|
|
|
+ MinigameIdleFlowerList = new List<Flower>();
|
|
|
+ }
|
|
|
+ List<int> idList = new List<int>(FindMissingGameSlotIDs);
|
|
|
+ Flower flower;
|
|
|
+ if (MinigameAward.HaveNewFlowerFlag)
|
|
|
+ {
|
|
|
+ List<FlowerInfo> flowerInfos = new List<FlowerInfo>(GardenManager.FlowerInfoDictionary.Values.ToList());
|
|
|
+ for (int i = 0; i < flowerInfos.Count; i++)
|
|
|
+ {
|
|
|
+ if (!flowerInfos[i].Unlock)
|
|
|
+ {
|
|
|
+ flowerInfos.RemoveAt(i);
|
|
|
+ i--;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ flowerInfos = flowerInfos.Disturb();
|
|
|
+ for (int i = 0; i < 3; i++)
|
|
|
+ {
|
|
|
+ flower = ResourceManager.GetFlower(flowerInfos[i], MinigameSlots[idList[i]]);
|
|
|
+ MinigameIdleFlowerList.Add(flower);
|
|
|
+ }
|
|
|
+ for (int i = 3; i < 9; i++)
|
|
|
+ {
|
|
|
+ flower = ResourceManager.GetFlower(flowerInfos.Random()[0], MinigameSlots[idList[i]]);
|
|
|
+ MinigameIdleFlowerList.Add(flower);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ int specialSlotID = idList.Random(1, true, true)[0];
|
|
|
+ FindMissingNewFlower = ResourceManager.GetFlower(GardenManager.FlowerInfoDictionary[MinigameAward.UnlockFlowerID], MinigameSlots[specialSlotID]);
|
|
|
+ FindMissingNewFlower.PlayNewFlowerEffec();
|
|
|
+ MinigameIdleFlowerList.Add(FindMissingNewFlower);
|
|
|
+ List<FlowerInfo> flowerInfos = new List<FlowerInfo>(GardenManager.FlowerInfoDictionary.Values.ToList());
|
|
|
+ for (int i = 0; i < flowerInfos.Count; i++)
|
|
|
+ {
|
|
|
+ if (!flowerInfos[i].Unlock || flowerInfos[i].ID == MinigameAward.UnlockFlowerID)
|
|
|
+ {
|
|
|
+ flowerInfos.RemoveAt(i);
|
|
|
+ i--;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ flowerInfos = flowerInfos.Disturb();
|
|
|
+ for (int i = 0; i < 2; i++)
|
|
|
+ {
|
|
|
+ flower = ResourceManager.GetFlower(flowerInfos[i], MinigameSlots[idList[i]]);
|
|
|
+ MinigameIdleFlowerList.Add(flower);
|
|
|
+ }
|
|
|
+ for (int i = 2; i < 8; i++)
|
|
|
+ {
|
|
|
+ flower = ResourceManager.GetFlower(flowerInfos.Random()[0], MinigameSlots[idList[i]]);
|
|
|
+ MinigameIdleFlowerList.Add(flower);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (int i = 0; i < MinigameIdleFlowerList.Count; i++)
|
|
|
+ {
|
|
|
+ MinigameIdleFlowerList[i].FlowerIcon.CreateTweenSr(1, 0, 0.25f, true, false, Curve.EaseOutQuad, false, true);
|
|
|
+ MinigameIdleFlowerList[i].FlowerIcon.GetTweenSr().InDestination = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void FindMissingGameRoundBegin()
|
|
|
+ {
|
|
|
+ FindMissingGameFadeTimer = FindMissingGameCurrentFadeTime;
|
|
|
+ for (int i = 0; i < MinigameIdleFlowerList.Count; i++)
|
|
|
+ {
|
|
|
+ MinigameIdleFlowerList[i].FlowerIcon.TweenBacSr();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void FindMissingFadeFlowers()
|
|
|
+ {
|
|
|
+ for (int i = 0; i < MinigameIdleFlowerList.Count; i++)
|
|
|
+ {
|
|
|
+ MinigameIdleFlowerList[i].FlowerIcon.TweenForSr();
|
|
|
+ }
|
|
|
+
|
|
|
+ DelayCall.Call
|
|
|
+ (
|
|
|
+ FindMissingGameFlowerDisappearTime,
|
|
|
+ FindMissingGameRoundStartOperate
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void OnFindMissingGameRightButtonClick(Button button, Image icon)
|
|
|
+ {
|
|
|
+ if (!Game)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (Panalty)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ ResourceManager.GetHudText($"+{FindMissingCorrectScore}", Color.white, 90, FindMissingCorrectFlower.ChildDic[FlowerLabel.ScorePos], ResourceManager.Get(CanvasLabel.D_HudParent), true);
|
|
|
+
|
|
|
+ Score += FindSoloCorrectScore;
|
|
|
+
|
|
|
+ FindMissingCorrectFlower.PlayFlashLight();
|
|
|
+
|
|
|
+ AudioManager.PlayClip(AudioLabel.ClickButton);
|
|
|
+
|
|
|
+ for (int i = 0; i < D_FindMissingGameBtns.Count; i++)
|
|
|
+ {
|
|
|
+ D_FindMissingGameBtns[i].TweenBacCG();
|
|
|
+ }
|
|
|
+ if (FindMissingNewFlower != null)
|
|
|
+ {
|
|
|
+ FindMissingNewFlower.StopNewFlowerEffec();
|
|
|
+ FindMissingNewFlower = null;
|
|
|
+ }
|
|
|
+ for (int i = 0; i < MinigameIdleFlowerList.Count; i++)
|
|
|
+ {
|
|
|
+ MinigameIdleFlowerList[i].FlowerIcon.TweenForSr();
|
|
|
+ }
|
|
|
+ FindMissingGameRoundEnd();
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void OnFindMissingGameWrongButtonClick(Button button, Image icon)
|
|
|
+ {
|
|
|
+ if (!Game)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (Panalty)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ Panalty = true;
|
|
|
+ PanaltyTimer = PanaltyTime;
|
|
|
+
|
|
|
+ icon.TweenForGra();
|
|
|
+ button.Shake(0.5f, 3, new Vector3(20f, 0, 0), Curve.EaseOutQuad);
|
|
|
+
|
|
|
+ AudioManager.PlayClip(AudioLabel.Error);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public void OnApplicationPause(bool pause)
|
|
|
{
|
|
|
if (!pause)
|