You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.8 KiB
46 lines
1.8 KiB
3 years ago
|
namespace ET
|
||
|
{
|
||
|
public class AppStart_Init: AEvent<EventType.AppStart>
|
||
|
{
|
||
|
protected override void Run(EventType.AppStart args)
|
||
|
{
|
||
|
RunAsync(args).Coroutine();
|
||
|
}
|
||
|
|
||
|
private async ETTask RunAsync(EventType.AppStart args)
|
||
|
{
|
||
|
Game.Scene.AddComponent<TimerComponent>();
|
||
|
Game.Scene.AddComponent<CoroutineLockComponent>();
|
||
|
|
||
|
// 加载配置
|
||
|
// Game.Scene.AddComponent<ResourcesComponent>();
|
||
|
// await ResourcesComponent.Instance.LoadBundleAsync("config.unity3d");
|
||
|
// Game.Scene.AddComponent<ConfigComponent>();
|
||
|
// ConfigComponent.Instance.Load();
|
||
|
// ResourcesComponent.Instance.UnloadBundle("config.unity3d");
|
||
|
|
||
|
Game.Scene.AddComponent<YooAssetComponent>();
|
||
|
Game.Scene.AddComponent<ConfigComponent>();
|
||
|
ConfigComponent.Instance.Load();
|
||
|
YooAssetComponent.Instance.ReleaseByTag("Config");
|
||
|
|
||
|
Game.Scene.AddComponent<OpcodeTypeComponent>();
|
||
|
Game.Scene.AddComponent<MessageDispatcherComponent>();
|
||
|
|
||
|
Game.Scene.AddComponent<NetThreadComponent>();
|
||
|
Game.Scene.AddComponent<SessionStreamDispatcher>();
|
||
|
Game.Scene.AddComponent<ZoneSceneManagerComponent>();
|
||
|
|
||
|
Game.Scene.AddComponent<GlobalComponent>();
|
||
|
Game.Scene.AddComponent<NumericWatcherComponent>();
|
||
|
Game.Scene.AddComponent<AIDispatcherComponent>();
|
||
|
Game.Scene.AddComponent<SoundComponent>();
|
||
|
// await ResourcesComponent.Instance.LoadBundleAsync("unit.unity3d");
|
||
|
|
||
|
Scene zoneScene = SceneFactory.CreateZoneScene(1, "Game", Game.Scene);
|
||
|
|
||
|
Game.EventSystem.Publish(new EventType.AppStartInitFinish() { ZoneScene = zoneScene });
|
||
|
}
|
||
|
}
|
||
|
}
|