mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 03:35:10 +00:00
GameManager no longer attempts to load games that are "fxOnly" (gameManager, countIn, etc)
This commit is contained in:
parent
dbf60aec34
commit
ef3b287beb
1 changed files with 13 additions and 2 deletions
|
@ -352,9 +352,20 @@ namespace RhythmHeavenMania
|
|||
|
||||
public GameObject GetGame(string name)
|
||||
{
|
||||
if (name == "gameManager" || name == "countIn")
|
||||
var gameInfo = GetGameInfo(name);
|
||||
if (gameInfo != null)
|
||||
{
|
||||
name = Beatmap.entities.FindAll(c => c.datamodel.Split(0) != "gameManager" && c.datamodel.Split(0) != "countIn").ToList()[0].datamodel.Split(0);
|
||||
if (gameInfo.fxOnly)
|
||||
{
|
||||
name = Beatmap.entities.FindAll(c => {
|
||||
var gameName = c.datamodel.Split(0);
|
||||
var newGameInfo = GetGameInfo(gameName);
|
||||
if (newGameInfo == null)
|
||||
return false;
|
||||
else
|
||||
return !newGameInfo.fxOnly;
|
||||
}).ToList()[0].datamodel.Split(0);
|
||||
}
|
||||
}
|
||||
return Resources.Load<GameObject>($"Games/{name}");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue