mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 03:35:10 +00:00
parent
25f469c26a
commit
c18d5353c5
2 changed files with 13 additions and 6 deletions
|
@ -657,19 +657,22 @@ namespace HeavenStudio
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void SwitchGame(string game, float beat)
|
public void SwitchGame(string game, float beat, bool flash)
|
||||||
{
|
{
|
||||||
if (game != currentGame)
|
if (game != currentGame)
|
||||||
{
|
{
|
||||||
if (currentGameSwitchIE != null)
|
if (currentGameSwitchIE != null)
|
||||||
StopCoroutine(currentGameSwitchIE);
|
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)
|
||||||
|
{
|
||||||
|
if(flash == true)
|
||||||
{
|
{
|
||||||
this.GetComponent<SpriteRenderer>().enabled = true;
|
this.GetComponent<SpriteRenderer>().enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
SetGame(game);
|
SetGame(game);
|
||||||
|
|
||||||
|
|
|
@ -259,8 +259,12 @@ namespace HeavenStudio
|
||||||
new Minigame("gameManager", "Game Manager", "", false, true, new List<GameAction>()
|
new Minigame("gameManager", "Game Manager", "", false, true, new List<GameAction>()
|
||||||
{
|
{
|
||||||
new GameAction("switchGame", "Switch Game", 0.5f, false,
|
new GameAction("switchGame", "Switch Game", 0.5f, false,
|
||||||
function: 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"]); },
|
||||||
inactiveFunction: delegate { GameManager.instance.SwitchGame(eventCaller.currentSwitchGame, eventCaller.currentEntity.beat); }
|
parameters: new List<Param>()
|
||||||
|
{
|
||||||
|
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",
|
new GameAction("end", "End Remix",
|
||||||
function: delegate {
|
function: delegate {
|
||||||
|
|
Loading…
Reference in a new issue