trygetminigame

it's from a different branch but it's nice to have rn
This commit is contained in:
AstrlJelly 2024-03-11 15:24:11 -04:00
parent 77fb150557
commit d0d8d8e95e

View file

@ -1243,6 +1243,17 @@ namespace HeavenStudio
return eventCaller.GetMinigame(name);
}
public bool TryGetMinigame<T>(out T mg) where T : Minigame
{
if (minigame is T tempMinigame) {
mg = tempMinigame;
return true;
} else {
mg = null;
return false;
}
}
Color colMain;
public void SetCurrentGame(string game, bool useMinigameColor = true)
{