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(); }
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; }
private void AddKeyboardInput(ControllerInput controllerInput, KeyCode keyCode) { ControllerInput.Keyboard keyboardInput = new ControllerInput.Keyboard(); keyboardInput.keyCode = keyCode; controllerInput.keys.Add(keyboardInput); }