public void NextPhase() { switch (_currentGamePhase) { // Triggered by player music start case GameflowPhases.Intro: // Wait for intro music to stop then start thythm section with countdown? _currentGamePhase = GameflowPhases.IntroActionSelection; IntroFinished(); IntroActionSelectionStarted(); break; //Will be triggered by time running out in action selection. case GameflowPhases.IntroActionSelection: _currentGamePhase = GameflowPhases.Rhythm; IntroActionSelectionFinished(); RhythmSegmentStarted(); break; case GameflowPhases.ActionSelectionAndEnemyAttacks: _currentGamePhase = GameflowPhases.Rhythm; ActionSelectionAndEnemyAttacksFinished(); RhythmSegmentStarted(); break; //Triggered by enemy music starting case GameflowPhases.Rhythm: _currentGamePhase = GameflowPhases.ActionExecution; RhythmSegmentFinished(); ActionExecutionStarted(); break; //Triggered by animations ending case GameflowPhases.ActionExecution: ActionExecutionFinished(); if (CharacterManager.Instance.GetAliveEnemies().Count != 0) { _currentGamePhase = GameflowPhases.ActionSelectionAndEnemyAttacks; ActionSelectionAndEnemyAttacksStarted(); } else { _currentGamePhase = GameflowPhases.End; EndPhaseStarted(); } break; case GameflowPhases.End: EndPhaseFinished(); break; } }
private void Initialise() { _currentGamePhase = GameflowPhases.Intro; StartCoroutine(FadeSplashAfterTime(2)); }
public void EndGame() { _currentGamePhase = GameflowPhases.End; EndPhaseStarted(); }