OVRTouchpadHelper.cs 562 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using UnityEngine;
  3. public sealed class OVRTouchpadHelper : MonoBehaviour
  4. {
  5. private void Awake()
  6. {
  7. UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
  8. }
  9. private void Start()
  10. {
  11. OVRTouchpad.TouchHandler += this.LocalTouchEventCallback;
  12. }
  13. private void Update()
  14. {
  15. OVRTouchpad.Update();
  16. }
  17. public void OnDisable()
  18. {
  19. OVRTouchpad.OnDisable();
  20. }
  21. private void LocalTouchEventCallback(object sender, EventArgs args)
  22. {
  23. OVRTouchpad.TouchArgs touchArgs = (OVRTouchpad.TouchArgs)args;
  24. switch (touchArgs.TouchType)
  25. {
  26. }
  27. }
  28. }