Пример #1
0
        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;
        }
Пример #2
0
 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());
 }
Пример #3
0
 public void BeginPhase()
 {
     Phase.Init(Game);
     Phase.Begin();
 }