using System.Collections; using System.Collections.Generic; using Mono; using Mono.UI.Core; using UnityEngine; public class AppLauncher : MonoBehaviour { private bool _isStart; void Start() { GameObject prefab = Resources.Load("Canvas"); GameObject _gameObject = GameObject.Instantiate(prefab); UIManager.Instance.SetUIRoot(_gameObject); ConfigComponent.Instance.Preload(); _isStart = true; _timer = 0; TimeComponent.Instance.AddTimer(10, () => { UIManager.Instance.LoadAndOpenPanel(UIManager.UILayer.Middle); }); } private float _timer; // Update is called once per frame // void Update() // { // if (_isStart) // { // _timer += Time.deltaTime; // if (_timer >= 15) // { // UIManager.Instance.LoadAndOpenPanel(UIManager.UILayer.Middle); // _isStart = false; // _timer = 0; // } // } // } }