Tanoda
VRInputManager.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
4
5public static class VRInputManager
6{
7 private static bool m_isKeyPressed = false; // true if controller button is pressed
8 private static Transform m_controllerTransform; // controller transform
9 private static bool m_controllerActive = true; // TOOD: actual value // true if controller is active (movement should be tracked)
10
11 public static void SetIsControllerButtonPressed(bool isPressed)
12 {
13 m_isKeyPressed = isPressed;
14 }
15
16 public static bool GetIsControllerButtonPressed()
17 {
18 return m_isKeyPressed;
19 }
20
21 public static void SetControllerTransform(Transform transform)
22 {
23 m_controllerTransform = transform;
24 }
25
26 public static Transform GetControllerTransform()
27 {
28 return m_controllerTransform;
29 }
30
31 public static void SetControllerActive(bool active)
32 {
33 m_controllerActive = active;
34 }
35
36 public static bool GetControllerActive()
37 {
38 return m_controllerActive;
39 }
40}