45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UniFramework.Event;
|
|
using YooAsset;
|
|
|
|
public class Boot : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 资源系统运行模式
|
|
/// </summary>
|
|
public EPlayMode PlayMode = EPlayMode.EditorSimulateMode;
|
|
|
|
void Awake()
|
|
{
|
|
Debug.Log($"资源系统运行模式:{PlayMode}");
|
|
Application.targetFrameRate = 60;
|
|
Application.runInBackground = true;
|
|
DontDestroyOnLoad(this.gameObject);
|
|
}
|
|
void Start()
|
|
{
|
|
// 游戏管理器
|
|
GameManager.Instance.Behaviour = this;
|
|
|
|
// 初始化事件系统
|
|
UniEvent.Initalize();
|
|
|
|
// 初始化资源系统
|
|
YooAssets.Initialize();
|
|
|
|
// 加载更新页面
|
|
var go = Resources.Load<GameObject>("PatchWindow");
|
|
GameObject.Instantiate(go);
|
|
|
|
// 补丁更新流程
|
|
PatchManager.Create("DefaultPackage", PlayMode);
|
|
PatchManager.Start();
|
|
}
|
|
private void Update()
|
|
{
|
|
PatchManager.Update();
|
|
}
|
|
} |