SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
933 B

4 years ago
  1. using System;
  2. namespace UnityEngine.XR.Management.Tests.Standalone
  3. {
  4. public class StandaloneSubsystem : Subsystem
  5. {
  6. private bool isRunning = false;
  7. public override bool running
  8. {
  9. get
  10. {
  11. return isRunning;
  12. }
  13. }
  14. public event Action startCalled;
  15. public event Action stopCalled;
  16. public event Action destroyCalled;
  17. public override void Start()
  18. {
  19. isRunning = true;
  20. if (startCalled != null)
  21. startCalled.Invoke();
  22. }
  23. public override void Stop()
  24. {
  25. isRunning = false;
  26. if (stopCalled != null)
  27. stopCalled.Invoke();
  28. }
  29. protected override void OnDestroy()
  30. {
  31. isRunning = false;
  32. if (destroyCalled != null)
  33. destroyCalled.Invoke();
  34. }
  35. }
  36. }