using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class SubGameModeMenuUI : MonoBehaviour { public Button arcadeBtn; public Button simulationBtn; private UIMenuManager uiManager; // Start is called before the first frame update void Start() { uiManager = GameObject.FindGameObjectWithTag("GameController")?.GetComponent(); arcadeBtn.onClick.AddListener(() => uiManager.SetSubGameMode(GameManager.SubGameMode.Arcade)); simulationBtn.onClick.AddListener(() => uiManager.SetSubGameMode(GameManager.SubGameMode.Simulation)); } }