public override void PregameSetup() { generator = GetComponent <EmotionsGenerator> (); EmotionCard.CheckEmotion = CheckEmotion; tutorialCanvas.gameObject.SetActive(false); tutorialHand.SetActive(false); generator.cardHand.gameObject.SetActive(false); generator.SetSlots(GameManager.Instance.GetLevel(typeOfGame) + 1); difficultyLevel = GameManager.Instance.GetLevel(DataType.Minigame.MonsterEmotions); if (GameManager.Instance.GetPendingTutorial(DataType.Minigame.MonsterEmotions)) { tutorialCoroutine = StartCoroutine(RunTutorial()); } else { switch (difficultyLevel) { case 2: scoreGoal = 5; break; case 3: scoreGoal = 7; break; default: scoreGoal = 3; break; } if (difficultyLevel > 2) { generator.allowOtherMonsterCards = true; } if (!monster) { CreateMonster(); } ChangeMonsterEmotion(DataType.MonsterEmotions.Happy); score = 0; if (TimerClock.Instance != null) { TimerClock.Instance.SetTimeLimit(timeLimit); TimerClock.Instance.StopTimer(); } UpdateScoreGauge(); TimerClock.Instance.gameObject.SetActive(true); generator.cardHand.gameObject.SetActive(true); generator.cardHand.SpawnIn(); StartCoroutine(DuringCountdown()); StartCountdown(PostCountdownSetup); } }
IEnumerator BeginReview() { generator.SetSlots(3); yield return(new WaitForSecondsRealtime(1f)); CreateMonster(); monster.GetComponent <Monster> ().spriteRenderer.sortingLayerName = "UI"; monster.GetComponent <Monster> ().spriteRenderer.sortingOrder = 6; isReviewRunning = true; EmotionCard.CheckEmotion = CheckEmotion; StartCoroutine(generator.CreateNextEmotions(0.5f, ContinueGame)); }