This commit is contained in:
2025-09-18 18:25:40 +08:00
parent 8ee325cc01
commit ce06ca8571
220 changed files with 165196 additions and 21 deletions

View File

@@ -0,0 +1,53 @@
using SkierFramework;
using System;
using System.Collections;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using UnityEngine;
public class Launcher : MonoBehaviour
{
public GameObject Splash;
void Start()
{
if (Splash == null)
{
Splash = GameObject.Find(nameof(Splash));
}
StartCor();
}
private async void StartCor()
{
var resourceCore = ResourceManager.Instance.GetResourceCore(UIConfig.UIPackageName);
await resourceCore.InitializeAsync(UIConfig.UIPackageName);
await UIManager.Instance.InitUIConfig();
await UIManager.Instance.Preload<UILoadingView>();
Loading.Instance.StartLoading(EnterGameCor);
if (Splash != null)
{
Splash.SetActive(false);
}
}
IEnumerator EnterGameCor(Action<float, string> loadingRefresh)
{
loadingRefresh?.Invoke(0.3f, "loading..........1");
yield return new WaitForSeconds(0.5f);
loadingRefresh?.Invoke(0.6f, "loading..........2");
yield return new WaitForSeconds(0.5f);
loadingRefresh?.Invoke(1, "loading..........3");
yield return new WaitForSeconds(0.5f);
UIManager.Instance.Open<UILoginView>();
}
}