IndieGame/client/Assets/Scripts/LaunchGame.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

41 lines
945 B
C#

using Sirenix.OdinInspector;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ether
{
public class LaunchGame : Boot
{
public override void OnInit()
{
TableProvider.Init();
TaskSystem.Inst.Init();
DialogueSystem.Inst.Init();
if (!string.IsNullOrEmpty(GlobalSettings.Inst.startFrame))
{
UIManager.Inst.OpenFrame(GlobalSettings.Inst.startFrame);
}
TimeSystem.Inst.Init();
if (!string.IsNullOrEmpty(GlobalSettings.Inst.startScence))
{
SceneSystemManager.Inst.LoadScene(GlobalSettings.Inst.startScence);
}
SaveSystem.Inst.LoadArchive(1, (isSave) =>
{
OfficialStartGame.Inst.OnStart();
SaveSystem.Inst.SaveArchive(0);
});
}
}
}