diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 0e1346a1..6cdbb002 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -657,19 +657,22 @@ namespace HeavenStudio #endregion - public void SwitchGame(string game, float beat) + public void SwitchGame(string game, float beat, bool flash) { if (game != currentGame) { if (currentGameSwitchIE != null) StopCoroutine(currentGameSwitchIE); - currentGameSwitchIE = StartCoroutine(SwitchGameIE(game, beat)); + currentGameSwitchIE = StartCoroutine(SwitchGameIE(game, beat, flash)); } } - IEnumerator SwitchGameIE(string game, float beat) + IEnumerator SwitchGameIE(string game, float beat, bool flash) { - this.GetComponent().enabled = true; + if(flash == true) + { + this.GetComponent().enabled = true; + } SetGame(game); diff --git a/Assets/Scripts/Minigames.cs b/Assets/Scripts/Minigames.cs index d349a301..c0e31c4c 100644 --- a/Assets/Scripts/Minigames.cs +++ b/Assets/Scripts/Minigames.cs @@ -259,8 +259,12 @@ namespace HeavenStudio new Minigame("gameManager", "Game Manager", "", false, true, new List() { new GameAction("switchGame", "Switch Game", 0.5f, false, - function: delegate { GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat); }, - inactiveFunction: delegate { GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat); } + function: delegate { var e = eventCaller.currentEntity; GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat, e["toggle"]); }, + parameters: new List() + { + new Param("toggle", true, "Black Flash", "Enable or disable the black screen for this Game Switch") + }, + inactiveFunction: delegate { var e = eventCaller.currentEntity; GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat, e["toggle"]); } ), new GameAction("end", "End Remix", function: delegate {