SceneLoadUtil.cs 554 B

12345678910111213141516171819202122232425
  1. using System;
  2. using UnityEngine;
  3. public class SceneLoadUtil : ScriptableObject
  4. {
  5. public static void Load(string name)
  6. {
  7. GameMain.Instance.MainCamera.FadeOut(1f, false, null, true, default(Color));
  8. }
  9. public static void Load(string toSceneName, GameObject fadeoutPanel)
  10. {
  11. GameMain.Instance.MainCamera.FadeOut(3f, false, delegate
  12. {
  13. GameMain.Instance.LoadScene(toSceneName);
  14. }, true, default(Color));
  15. TweenAlpha.Begin(fadeoutPanel, 3f, 0f);
  16. }
  17. public static void Load(int number)
  18. {
  19. }
  20. private const float DURATION_TO_FADE = 3f;
  21. }