Karate Man started.

This commit is contained in:
Starpelly
2021-12-29 01:52:48 -05:00
parent c653d487ac
commit 88f13795a9
127 changed files with 5877 additions and 46 deletions

View File

@ -61,6 +61,7 @@ namespace RhythmHeavenMania
if (Beatmap.entities.Count >= 1)
{
SetCurrentGame(Beatmap.entities[0].datamodel.Split('/')[0]);
SetGame(Beatmap.entities[0].datamodel.Split('/')[0]);
}
}
@ -136,20 +137,33 @@ namespace RhythmHeavenMania
{
this.GetComponent<SpriteRenderer>().enabled = true;
GetGame(currentGame).holder.GetComponent<Minigame>().OnGameSwitch();
SetGame(game);
yield return new WaitForSeconds(0.1666f);
this.GetComponent<SpriteRenderer>().enabled = false;
}
private void SetGame(string game, bool onGameSwitch = true)
{
if (onGameSwitch)
{
if (GetGame(currentGame).holder.GetComponent<Minigame>() != null)
GetGame(currentGame).holder.GetComponent<Minigame>().OnGameSwitch();
}
GetGame(currentGame).holder.SetActive(false);
GetGame(game).holder.SetActive(true);
GameCamera.orthographic = true;
GetGame(game).holder.GetComponent<Minigame>().OnGameSwitch();
if (onGameSwitch)
{
if (GetGame(currentGame).holder.GetComponent<Minigame>() != null)
GetGame(game).holder.GetComponent<Minigame>().OnGameSwitch();
}
SetCurrentGame(game);
yield return new WaitForSeconds(0.1666f);
this.GetComponent<SpriteRenderer>().enabled = false;
}
public EventCaller.MiniGame GetGame(string name)