IndieGame/client/Assets/Scripts/LaunchGame.cs

41 lines
948 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00

using Sirenix.OdinInspector;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ether
{
public class LaunchGame : Boot
{
protected override void OnInit()
2024-10-11 10:12:15 +08:00
{
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);
});
}
}
}