using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameRoot : MonoBehaviour { public static GameRoot Instance = null; [Header("当前窗口")] public GameObject CurrentWnd=null; [Header("各窗口")] public MenuWnd menuWnd; public InfoWnd infoWnd; private void Awake() { if (Instance == null) { Instance = this; } menuWnd.Init(); infoWnd.Init(); } public void ShowInfoWnd(string title, string info) { infoWnd.ShowInfoWnd(title, info); } public void HideInfoWnd() { infoWnd.CloseInfoWnd(); } }