diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 2ce1d7a65..1db820d34 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -1243,6 +1243,17 @@ namespace HeavenStudio return eventCaller.GetMinigame(name); } + public bool TryGetMinigame(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) {