CommonBridge.cs 736 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System;
  5. using ET;
  6. public class CommonBridge
  7. {
  8. private static CommonBridge _instance;
  9. public static CommonBridge Instance
  10. {
  11. get
  12. {
  13. if (_instance == null)
  14. {
  15. _instance = new CommonBridge();
  16. }
  17. return _instance;
  18. }
  19. }
  20. public event Action<Scene,object> dispathPush;
  21. public void SetDispathPush(Scene scene,object type)
  22. {
  23. if(dispathPush != null)
  24. {
  25. dispathPush(scene,type);
  26. }
  27. }
  28. public void Clear()
  29. {
  30. if (dispathPush != null) dispathPush = null;
  31. Log.Debug("clear");
  32. }
  33. }