public static FinaleRound CreateFinaleRound() { var round = new FinaleRound(); FinaleRounds.Add(round); return(round); }
public static void NextRound() { ++_currentRoundIndex; Question[] questions = null; GameRound currentGameRound = null; switch (CurrentRound) { case Round.ThreeSixNine: currentGameRound = new ThreeSixNineRound(); questions = GetCurrentRoundQuestions <ThreeSixNineQuestion>(); break; case Round.OpenDoor: currentGameRound = new OpenDoorRound(); questions = GetCurrentRoundQuestions <OpenDoorQuestion>(); break; case Round.Puzzle: currentGameRound = new PuzzleRound(); questions = GetCurrentRoundQuestions <PuzzleQuestion>(); break; case Round.Gallery: currentGameRound = new GalleryRound(); questions = GetCurrentRoundQuestions <GalleryQuestion>(); break; case Round.CollectiveMemory: currentGameRound = new CollectiveMemoryRound(); questions = GetCurrentRoundQuestions <CollectiveMemoryQuestion>(); break; case Round.Finale: currentGameRound = new FinaleRound(); questions = GetCurrentRoundQuestions <FinaleQuestion>(); break; case Round.Bonus: currentGameRound = new BonusRound(); break; case Round.Done: currentGameRound = new DoneRound(); break; } SceneManager.Instance.Load(currentGameRound.SceneName, () => currentGameRound.Start(_teams, questions)); }
public void SetController(FinaleRound controller) { _controller = controller; _controller.OnWaitingForNextQuestion += SetStateWaitingForNextQuestion; _controller.OnWaitingForTimerStart += SetStateWaitingForStartTimer; _controller.OnWaitingForNextTeam += SetStateWaitingForNextTeam; _nextQuestionButton.onClick.AddListener(_controller.NextQuestion); _nextPlayerButton.onClick.AddListener(_controller.NextTeam); _startTimerButton.onClick.AddListener(_controller.StartTimer); _startTimerButton.onClick.AddListener(SetStateToWaitingForAnswer); _playerPassedButton.onClick.AddListener(_controller.PlayerPassed); _endRoundButton.onClick.AddListener(_controller.EndRound); for (int i = 0; i < _answerButtons.Length; i++) { _answerButtons[i].interactable = false; } }