using System.Collections; using System.Collections.Generic; using UnityEngine; public class UI { public static Canvas Canvas => _controller.Canvas; private static WindowsController _controller; public static void Init() { LoadController(); } private static void LoadController() { if (_controller == null) _controller = Assets.CreateImmortal("Main/Windows"); _controller.Init(); } public static IReadOnlyList GetVisibleStack() => _controller.GetVisibleStack(); public static void HideVisibleStack() => _controller.HideVisibleStack(); public static Coroutine StartCoroutine(IEnumerator coroutine) => _controller.StartCoroutine(coroutine); public static T GetOrCreateWindow() where T : Window { return _controller.GetOrCreateWindow(); } public static T ShowWindow() where T : ParameterlessWindow { return _controller.ShowWindow(); } public static T ShowWindow(A1 a1) where T : ParameterWindow { return _controller.ShowWindow(a1); } }