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