AVRControllerBehavior.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. using System;
  2. using UnityEngine;
  3. public abstract class AVRControllerBehavior : MonoBehaviour
  4. {
  5. public abstract Vector3 GetVelocityHand();
  6. public abstract float GetRotHandY();
  7. public abstract AVRControllerBehavior.BEH_TYPE BehaviourType { get; }
  8. public abstract bool IsHandCameraMode { get; }
  9. public abstract bool HandCameraMode { get; set; }
  10. public abstract bool IsHandPenMode { get; }
  11. public abstract bool HandDanceMode { get; set; }
  12. public abstract bool HandVRIKMode { get; set; }
  13. public abstract bool HandYotogiMode { get; set; }
  14. public virtual AVRControllerBehavior.LIMIT_MODE HandLimitMode
  15. {
  16. get
  17. {
  18. return this.m_eHandLimitMode;
  19. }
  20. set
  21. {
  22. this.m_eHandLimitMode = value;
  23. }
  24. }
  25. public virtual bool HandModelVisible
  26. {
  27. get
  28. {
  29. return this.m_bHandModelVisible;
  30. }
  31. set
  32. {
  33. this.m_bHandModelVisible = value;
  34. }
  35. }
  36. protected virtual void Awake()
  37. {
  38. }
  39. public virtual void Init(AVRController f_controller)
  40. {
  41. this.m_controller = f_controller;
  42. this.m_buttons = this.m_controller.VRControllerButtons;
  43. this.m_obj_controller = this.m_controller.VRControllerObj;
  44. }
  45. public bool m_bHandL = true;
  46. public Vector3 m_vMoveCam;
  47. public float m_fRotCam;
  48. protected OvrMgr.OvrObject.Controller m_obj_controller;
  49. protected AVRController m_controller;
  50. protected AVRControllerButtons m_buttons;
  51. protected Transform m_trTabletPenRoot;
  52. protected GameObject m_goTabletPen;
  53. protected AVRControllerBehavior.LIMIT_MODE m_eHandLimitMode;
  54. protected bool m_bHandModelVisible = true;
  55. protected bool m_bHandDanceMode;
  56. protected bool m_bHandVRIKMode;
  57. protected bool m_bHandYotogiMode;
  58. public enum BEH_TYPE
  59. {
  60. LEGACY,
  61. NEW,
  62. DUMMY
  63. }
  64. public enum LIMIT_MODE
  65. {
  66. NORMAL,
  67. NO_WARP,
  68. HAND_ONLY
  69. }
  70. }