Пример #1
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginChangeCheck();

            Gamepad.Button key = (Gamepad.Button)EditorGUI.EnumPopup(position, label, (Gamepad.Button)property.intValue);

            if (EditorGUI.EndChangeCheck())
            {
                property.intValue = (int)key;
            }
        }
Пример #2
0
 void Check(Gamepad.Button button, Text text)
 {
     if (text == null)
     {
         return;
     }
     if (Gamepad.JustDown(button))
     {
         text.color = Color.yellow;
     }
     else if (Gamepad.Down(button))
     {
         text.color = Color.white;
     }
     else
     {
         text.color = Color.grey;
     }
 }
Пример #3
0
 public static bool GetUp(AirVRCameraRig cameraRig, Gamepad.Button button)
 {
     return(GetButtonUp(cameraRig, AirVRInputDeviceName.Gamepad, Gamepad.ParseControlID(button)));
 }