This commit is contained in:
Rapandrasmus 2023-09-08 16:27:15 +02:00 committed by GitHub
parent 53bf359abf
commit 8c85e78a6d

View file

@ -763,7 +763,7 @@ namespace HeavenStudio
IEnumerator SwitchGameIE(string game, double beat, bool flash) IEnumerator SwitchGameIE(string game, double beat, bool flash)
{ {
if(flash) if (flash)
{ {
HeavenStudio.StaticCamera.instance.ToggleCanvasVisibility(false); HeavenStudio.StaticCamera.instance.ToggleCanvasVisibility(false);
} }
@ -774,8 +774,16 @@ namespace HeavenStudio
if (miniGame != null) if (miniGame != null)
miniGame.OnGameSwitch(beat); miniGame.OnGameSwitch(beat);
//before beat-based: yield return new WaitForSeconds(0.1f); while(beat + 0.25 > Conductor.instance.songPositionInBeats)
yield return new WaitForSeconds(Conductor.instance.pitchedSecPerBeat / 4); {
if (!Conductor.instance.isPlaying)
{
HeavenStudio.StaticCamera.instance.ToggleCanvasVisibility(true);
SetAmbientGlowToCurrentMinigameColor();
StopCoroutine(currentGameSwitchIE);
}
yield return null;
}
HeavenStudio.StaticCamera.instance.ToggleCanvasVisibility(true); HeavenStudio.StaticCamera.instance.ToggleCanvasVisibility(true);
SetAmbientGlowToCurrentMinigameColor(); SetAmbientGlowToCurrentMinigameColor();