InputDevicePartEventBase.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. protected abstract void OnUpdateEvent();
  30. protected abstract void DispatchEventDelegate();
  31. protected abstract void DispatchEventTarget();
  32. }
  33. }