public void EnterState() { anturaEnterTimer = MixedLettersConfiguration.Instance.Variation == MixedLettersConfiguration.MixedLettersVariation.Spelling ? 3.25f : 1.5f; anturaEntered = false; anturaBarked = false; anturaExitTimer = Random.Range(0.75f, 1.5f); anturaExited = false; isAnturaEnterTimerActivated = false; game.GenerateNewWord(); game.SayQuestion(OnQuestionOver); VictimLLController.instance.HideVictoryRays(); VictimLLController.instance.Reset(); VictimLLController.instance.Enable(); Vector3 victimLLPosition = VictimLLController.instance.transform.position; victimLLPosition.x = Random.Range(0, 40) % 2 == 0 ? 0.5f : -0.5f; VictimLLController.instance.SetPosition(victimLLPosition); game.roundNumber++; if (game.roundNumber == 1) { MinigamesUI.Init(MinigamesUIElement.Timer | MinigamesUIElement.Starbar); MinigamesUI.Timer.Setup(timePerRound); } MinigamesUI.Timer.Rewind(); }
public void initUI() { //ui: MinigamesUI.Init(MinigamesUIElement.Starbar | MinigamesUIElement.Timer); timer.initTimer(); }
public void Initialize(bool showStarsBar, bool showClock, bool showLives) { this.showStarsBar = showStarsBar; this.showClock = showClock; this.showLives = showLives; MinigamesUI.Init((showLives ? MinigamesUIElement.Lives : 0) | (showStarsBar ? MinigamesUIElement.Starbar : 0) | (showClock ? MinigamesUIElement.Timer : 0)); }
public void Init(int _id) { switch (_id) { case 0: MinigamesUI.Init(MinigamesUIElement.Starbar); break; case 1: MinigamesUI.Init(MinigamesUIElement.Starbar | MinigamesUIElement.Timer); break; case 2: MinigamesUI.Init(MinigamesUIElement.Starbar | MinigamesUIElement.Lives); break; case 3: MinigamesUI.Init(MinigamesUIElement.Starbar | MinigamesUIElement.Timer | MinigamesUIElement.Lives); break; } foreach (Tester_MinigamesUIPanel panel in Panels) { switch (panel.PanelType) { case Tester_MinigamesUIPanel.UIPanelType.Timer: panel.gameObject.SetActive(_id == 1 || _id == 3); break; case Tester_MinigamesUIPanel.UIPanelType.Lives: panel.gameObject.SetActive(_id == 2 || _id == 3); break; case Tester_MinigamesUIPanel.UIPanelType.Starbar: panel.gameObject.SetActive(true); break; default: continue; } if (panel.gameObject.activeSelf) { panel.Refresh(); } } }
public IEnumerator StartNewRound_LettersInWord() { IQuestionPack newQuestionPack = ThrowBallsConfiguration.Instance.Questions.GetNextQuestion(); List <ILivingLetterData> letterData = newQuestionPack.GetCorrectAnswers().ToList(); numLettersRemaining = letterData.Count; numLetters = numLettersRemaining; ResetScene(); if (roundNumber == 1) { MinigamesUI.Init(MinigamesUIElement.Lives | MinigamesUIElement.Starbar); MinigamesUI.Lives.Setup(MAX_NUM_BALLS); } UIController.instance.Enable(); ILivingLetterData firstLetter = letterData[0]; letterData.RemoveAt(0); List <ILivingLetterData> remainingLetters = letterData; question = newQuestionPack.GetQuestion(); UIController.instance.SetLetterHint(question); SayQuestion(); yield return(new WaitForSeconds(1f)); int numLettersInRound = remainingLetters.Count + 1; for (int i = 0; i < numLettersInRound; i++) { GameObject letterObj = letterPool[i]; letterObj.SetActive(true); letterControllers[i].SetMotionVariation(GetMotionOfRound()); letterControllers[i].SetPropVariation(GetPropOfRound()); if (i == 0) { letterObj.tag = Constants.TAG_CORRECT_LETTER; letterControllers[i].SetLetter(firstLetter); } else { if (remainingLetters[0].Id == firstLetter.Id) { letterObj.tag = Constants.TAG_CORRECT_LETTER; } else { letterObj.tag = Constants.TAG_WRONG_LETTER; } letterControllers[i].SetLetter(remainingLetters[0]); remainingLetters.RemoveAt(0); } } isRoundOngoing = true; BallController.instance.Enable(); if (IsTutorialLevel()) { switch (ThrowBallsConfiguration.Instance.Variation) { case ThrowBallsVariation.letters: audioManager.PlayDialogue(Db.LocalizationDataId.ThrowBalls_letters_Tuto); break; case ThrowBallsVariation.words: audioManager.PlayDialogue(Db.LocalizationDataId.ThrowBalls_words_Tuto); break; case ThrowBallsVariation.lettersinword: audioManager.PlayDialogue(Db.LocalizationDataId.ThrowBalls_letterinword_Tuto); break; default: break; } inputManager.Enabled = true; isVoiceOverDone = true; ShowTutorialUI(); } }
public void initUI() { //ui: MinigamesUI.Init(MinigamesUIElement.Starbar | MinigamesUIElement.Timer); MinigamesUI.Timer.Setup(UnityEngine.Mathf.Lerp(90.0f, 60.0f, TakeMeHomeConfiguration.Instance.Difficulty)); }
public void EnterState() { MinigamesUI.Init(MinigamesUIElement.Starbar | MinigamesUIElement.Timer); game.PlayIntroVoiceOver(); game.Play(); }