protected override void OnBegin() { // Setup UI foreach (GameObject obj in EnableDuringPhase) { obj.SetActive(true); } PassButton.onClick.AddListener(PassButtonPressedCallback); NameInput.onEndEdit.AddListener(OnTextEditEndCallback); PassButton.interactable = false; // Setup and distribute roles roles.Clear(); foreach (var roleCount in game.Variant.RoleCounts) { for (int i = 0; i < roleCount.Count; i++) { roles.Add(roleCount.Role); } } ShuffleRoles(); // Clear players and display first role game.Players.Clear(); RoleText.text = roles[curIndex].DisplayName; RoleText.color = roles[curIndex].StartingAllegiance.DisplayColor; // Setup pass phase PassPhase.Init(game); PassPhase.Completed += OnPassPhaseEndCallback; }
protected override void OnBegin() { Timer = game.FirstDay ? game.Configuration.FirstDayTimerMinutes * 60f : game.Configuration.DayTimerMinutes * 60f; StartTrialButton.gameObject.SetActive(true); if (game.Configuration.CanSleepEarly) { SleepEarlyButton.gameObject.SetActive(true); SleepEarlyButton.onClick.AddListener(Complete); } TimerDisplay.gameObject.SetActive(true); TrialPhase.Init(game); onTrial = false; StartTrialButton.onClick.AddListener(OnStartTrialButtonCallback); StartCoroutine(CountdownTimer()); }
public void BeginPhase() { Phase.Init(Game); Phase.Begin(); }