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