Logo.cs 946 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using UnityEngine;
  2. using UnityEngine.SceneManagement;
  3. using System;
  4. using System.Collections;
  5. public class Logo : MonoBehaviour
  6. {
  7. #region 变量
  8. public static bool Complete;
  9. public static GameObject Camera;
  10. #endregion
  11. public void Awake()
  12. {
  13. Camera = GameObject.Find("Main Camera");
  14. AudioManager.LoadPrefs();
  15. AudioManager.SetLogoVolume();
  16. DelayCall.Call
  17. (
  18. 1,
  19. () =>
  20. {
  21. if (Initializer.Instance.DebugMode)
  22. {
  23. Finish();
  24. }
  25. }
  26. );
  27. }
  28. public void Begin()
  29. {
  30. Complete = false;
  31. }
  32. public void Finish()
  33. {
  34. ResourceManager.Instance.StopAllAsync();
  35. Camera.SetActive(false);
  36. UIManager.Init(Initializer.Instance.DebugMode);
  37. SceneManager.LoadScene(1);
  38. Complete = true;
  39. }
  40. }