using System; using System.IO; namespace ET.Client { [Event(SceneType.Process)] public class EntryEvent3_InitClient: AEvent { protected override async ETTask Run(Scene scene, ET.EventType.EntryEvent3 args) { // 加载配置 Root.Instance.Scene.AddComponent(); Root.Instance.Scene.AddComponent(); await ResourcesComponent.Instance.LoadBundleAsync("unit.unity3d"); Game.AddSingleton(); Game.AddSingleton(); Game.AddSingleton(); Game.AddSingleton(); Game.AddSingleton(); Scene clientScene = await SceneFactory.CreateClientScene(1, "Game"); await EventSystem.Instance.PublishAsync(clientScene, new EventType.AppStartInitFinish()); } } }