ViveController.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. using System;
  2. public class ViveController : AVRController
  3. {
  4. public override bool IsHandCameraMode
  5. {
  6. get
  7. {
  8. return this.m_CtrlBehNow.IsHandCameraMode;
  9. }
  10. }
  11. public override bool HandCameraMode
  12. {
  13. get
  14. {
  15. return this.m_CtrlBehNow.HandCameraMode;
  16. }
  17. set
  18. {
  19. if (value)
  20. {
  21. this.m_CtrlBehNow.HandCameraMode = true;
  22. }
  23. }
  24. }
  25. public override bool IsHandPenMode
  26. {
  27. get
  28. {
  29. return this.m_CtrlBehNow.IsHandPenMode;
  30. }
  31. }
  32. public override AVRControllerBehavior.LIMIT_MODE HandLimitMode
  33. {
  34. get
  35. {
  36. return this.m_CtrlBehNow.HandLimitMode;
  37. }
  38. set
  39. {
  40. this.m_CtrlBehNow.HandLimitMode = value;
  41. }
  42. }
  43. public override bool HandModelVisible
  44. {
  45. get
  46. {
  47. return this.m_CtrlBehNow.HandModelVisible;
  48. }
  49. set
  50. {
  51. this.m_CtrlBehNow.HandModelVisible = value;
  52. }
  53. }
  54. public override bool HandDanceMode
  55. {
  56. get
  57. {
  58. return this.m_CtrlBehNow.HandDanceMode;
  59. }
  60. set
  61. {
  62. this.m_CtrlBehNow.HandDanceMode = value;
  63. }
  64. }
  65. public override bool HandVRIKMode
  66. {
  67. get
  68. {
  69. return this.m_CtrlBehNow.HandVRIKMode;
  70. }
  71. set
  72. {
  73. this.m_CtrlBehNow.HandVRIKMode = value;
  74. }
  75. }
  76. public override bool HandYotogiMode
  77. {
  78. get
  79. {
  80. return this.m_CtrlBehNow.HandYotogiMode;
  81. }
  82. set
  83. {
  84. this.m_CtrlBehNow.HandYotogiMode = value;
  85. }
  86. }
  87. public override void Init()
  88. {
  89. base.Init();
  90. if (GameMain.Instance.VRMode)
  91. {
  92. this.m_CtrlBehOld = base.GetComponent<ViveControllerBehavior>();
  93. this.m_CtrlBehOld.Init(this);
  94. this.m_CtrlBehNew = base.GetComponent<ViveControllerBehavior2>();
  95. this.m_CtrlBehNew.Init(this);
  96. }
  97. }
  98. }