EntryEvent3_InitClient.cs 598 B

1234567891011121314151617
  1. namespace ET.Client
  2. {
  3. [Event(SceneType.Process)]
  4. public class EntryEvent3_InitClient : AEvent<ET.EventType.EntryEvent3>
  5. {
  6. protected override async ETTask Run(Scene scene, ET.EventType.EntryEvent3 args)
  7. {
  8. Root.Instance.Scene.AddComponent<GlobalViewComponent>();
  9. Game.AddSingleton<EffectMgr>();
  10. Game.AddSingleton<SoundManager>();
  11. Scene clientScene = await SceneFactory.CreateClientScene(1, "Game");
  12. await EventSystem.Instance.PublishAsync(clientScene, new EventType.AppStartInitFinish());
  13. }
  14. }
  15. }