Init.cs 518 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using CommandLine;
  3. using UnityEngine;
  4. namespace ET
  5. {
  6. public class Init: MonoBehaviour
  7. {
  8. private void Start()
  9. {
  10. DontDestroyOnLoad(gameObject);
  11. World.Instance.AddSingleton<Logger>().Log = new UnityLogger();
  12. Entry.Start();
  13. }
  14. private void Update()
  15. {
  16. TimeInfo.Instance.Update();
  17. FiberManager.Instance.Update();
  18. }
  19. private void LateUpdate()
  20. {
  21. FiberManager.Instance.LateUpdate();
  22. }
  23. private void OnApplicationQuit()
  24. {
  25. World.Instance.Dispose();
  26. }
  27. }
  28. }