コード例 #1
0
 private void OnPlayerChosenForTrial(Player player)
 {
     onTrial = true;
     BackButton.onClick.RemoveListener(BackFromPlayerSelect);
     PlayerSelection.PlayerSelected -= OnPlayerChosenForTrial;
     if (game.Configuration.PauseDayTimerOnTrial)
     {
         Paused = true;
     }
     BackButton.gameObject.SetActive(false);
     PlayerSelection.gameObject.SetActive(false);
     TimerDisplay.gameObject.SetActive(false);
     MinifiedTimerDisplay.gameObject.SetActive(true);
     game.PutPlayerOnTrial(player);
     TrialPhase.Completed += OnTrialPhaseCompleted;
     TrialPhase.Begin();
 }
コード例 #2
0
        private void PassButtonPressedCallback()
        {
            Player player = new Player(NameInput.text);

            player.CurrentRole       = roles[curIndex];
            player.CurrentAllegiance = player.CurrentRole.StartingAllegiance;
            game.Players.Add(player);
            NameInput.text          = "";
            RoleText.text           = "";
            PassButton.interactable = false;
            curIndex++;
            if (curIndex >= roles.Count)
            {
                Complete();
            }
            else
            {
                PassPhase.Begin();
            }
        }
コード例 #3
0
 public void BeginPhase()
 {
     Phase.Init(Game);
     Phase.Begin();
 }