예제 #1
0
 private void SetKeyboardInput(SerializedProperty inputProp, ControllerInput.Keyboard input, HumanoidControl humanoid)
 {
     EditorGUILayout.BeginHorizontal();
     input.keyCode = (KeyCode)EditorGUILayout.EnumPopup(input.keyCode, GUILayout.Width(80));
     SetInput(inputProp, input, humanoid.gameObject);
     EditorGUILayout.EndHorizontal();
 }
예제 #2
0
 private void ExtendKeyboardInput(ref ControllerInput.Keyboard[] keyboardInput)
 {
     ControllerInput.Keyboard[] newKeyboardInput = new ControllerInput.Keyboard[keyboardInput.Length + 1];
     for (int i = 0; i < keyboardInput.Length; i++)
     {
         newKeyboardInput[i] = keyboardInput[i];
     }
     keyboardInput = newKeyboardInput;
 }
예제 #3
0
 private void AddKeyboardInput(ControllerInput controllerInput, KeyCode keyCode)
 {
     ControllerInput.Keyboard keyboardInput = new ControllerInput.Keyboard();
     keyboardInput.keyCode = keyCode;
     controllerInput.keys.Add(keyboardInput);
 }