AppStart_Init.cs 786 B

123456789101112131415161718192021222324
  1. namespace ET
  2. {
  3. public class AppStart_Init: AEvent<EventType.AppStart>
  4. {
  5. public override async ETTask Run(EventType.AppStart args)
  6. {
  7. Game.Scene.AddComponent<TimerComponent>();
  8. // 下载ab包
  9. //await BundleHelper.DownloadBundle("1111");
  10. // 加载配置
  11. Game.Scene.AddComponent<ResourcesComponent>().LoadBundle("config.unity3d");
  12. Game.Scene.AddComponent<ConfigComponent>();
  13. Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle("config.unity3d");
  14. Game.Scene.AddComponent<OpcodeTypeComponent>();
  15. Game.Scene.AddComponent<MessageDispatcherComponent>();
  16. Scene zoneScene = await SceneFactory.CreateZoneScene(1, 0, "Game");
  17. }
  18. }
  19. }