InputDevicePartEventBase.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using UnityEngine;
  7. namespace SC.XR.Unity.Module_InputSystem {
  8. public abstract class InputDevicePartEventBase : SCModule {
  9. public InputDevicePartDispatchEventBase inputDevicePartDispatchEventBase;
  10. public InputDevicePartEventBase(InputDevicePartDispatchEventBase inputDevicePartDispatchEventBase) {
  11. this.inputDevicePartDispatchEventBase = inputDevicePartDispatchEventBase;
  12. }
  13. public PointerBase pointerBase {
  14. get {
  15. return inputDevicePartDispatchEventBase.inputDevicePartBase.detectorBase.pointerBase;
  16. }
  17. }
  18. public InputDataBase inputDataBase {
  19. get {
  20. return inputDevicePartDispatchEventBase.inputDevicePartBase.inputDataBase;
  21. }
  22. }
  23. public override void OnSCLateUpdate() {
  24. base.OnSCLateUpdate();
  25. OnUpdateEvent();
  26. DispatchEventDelegate();
  27. DispatchEventTarget();
  28. }
  29. public override void OnSCDisable() {
  30. base.OnSCDisable();
  31. DispatchEventDelegate();
  32. DispatchEventTarget();
  33. }
  34. protected abstract void OnUpdateEvent();
  35. protected abstract void DispatchEventDelegate();
  36. protected abstract void DispatchEventTarget();
  37. }
  38. }