Files
Continentis/Assets/Scripts/Menu/MenuManager.cs
SoulliesOfficial 9b1b5ca93f initial
2025-10-03 00:02:43 -04:00

33 lines
885 B
C#

using System;
using SoulliesFramework.General;
using UnityEngine;
using UnityEngine.UI;
namespace Continentis.Menu
{
public class MenuManager : MonoBehaviour
{
public Button enterGameButton;
private async void Start()
{
try
{
enterGameButton.onClick.AddListener(EnterGame);
enterGameButton.interactable = false;
await ModLoader.LoadAllModsAsync();
await CardDatabase.Instance.CollectAllCardData();
enterGameButton.interactable = true;
}
catch (Exception e)
{
Debug.LogError($"[MenuManager] Failed to load mods: {e}");
}
}
public void EnterGame()
{
UnityEngine.SceneManagement.SceneManager.LoadScene("GameScene");
}
}
}