Пример #1
0
 public void OnGamePhaseChange(GamePhases current)
 {
     if (!isLocalPlayer)
     {
         return;
     }
     this.CurrentGamePhase = current;
     this.UiPhase.text     = CurrentGamePhase.ToString();
 }
Пример #2
0
 void EndGamePhaseBehavior()
 {
     Debug.Log("Ending phase " + gamePhase.ToString());
     switch (gamePhase)
     {
     case GamePhases.PlayerInteraction:
         gridManager.ClearGrid(true);
         tutorialManager.ClearActiveTutorials();
         break;
     }
     currentPhase.EndPhase();
 }
Пример #3
0
    public void SetGamePhase(GamePhases inputPhase)
    {
        Debug.Log("SetGamePhase" + inputPhase.ToString());
        if (currentPhase != null)
        {
            EndGamePhaseBehavior();
        }

        gamePhase = inputPhase;
        switch (gamePhase)
        {
        case GamePhases.StartScreen:
            currentPhase = startScreenBehavior;
            break;

        case GamePhases.LoadScreen:
            currentPhase = loadScreenBehavior;
            tutorialManager.tutorialIndex = 0;
            tutorialManager.ResetTutorialCompletionData();
            break;

        case GamePhases.GenerateTrack:
            currentPhase = generateTrackBehavior;
            break;

        case GamePhases.PlayerInteraction:
            currentPhase = playerInteractionBehavior;
            break;

        case GamePhases.GradeSubmission:
            currentPhase = gradeSubmissionBehavior;
            break;

        case GamePhases.GradeReport:
            currentPhase = gradeReportBehavior;
            break;

        case GamePhases.EndScreen:
            currentPhase = endScreenBehavior;
            break;

        case GamePhases.CloseGame:
            currentPhase = exitGameBehavior;
            break;
        }

        BeginGamePhaseBehavior();
    }
Пример #4
0
        public override string ToString()
        {
            string tmp = Player.ToString() + " => " + Type.ToString() + ": " + Phase.ToString();

            return(tmp);
        }