public void OnGamePhaseChange(GamePhases current) { if (!isLocalPlayer) { return; } this.CurrentGamePhase = current; this.UiPhase.text = CurrentGamePhase.ToString(); }
void EndGamePhaseBehavior() { Debug.Log("Ending phase " + gamePhase.ToString()); switch (gamePhase) { case GamePhases.PlayerInteraction: gridManager.ClearGrid(true); tutorialManager.ClearActiveTutorials(); break; } currentPhase.EndPhase(); }
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(); }
public override string ToString() { string tmp = Player.ToString() + " => " + Type.ToString() + ": " + Phase.ToString(); return(tmp); }