|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLE_LEGACY_INPUT_MANAGER
|
|
|
|
[ContextMenu("Initialize Values (Legacy Input)")] |
|
|
|
[ContextMenu("Initialize Values (Legacy Input)")] |
|
|
|
void InitializeValuesLegacy() |
|
|
|
{ |
|
|
|
MovementHorizontalAxis = "Horizontal"; |
|
|
|
|
|
|
JumpButton = "Jump"; |
|
|
|
#if UNITY_EDITOR
|
|
|
|
UnityEditor.EditorUtility.SetDirty(this); |
|
|
|
#endif
|
|
|
|
} |
|
|
|
#endif
|
|
|
|
#if ENABLE_INPUT_SYSTEM
|
|
|
|
|
|
|
move = new InputAction("Left Stick", InputActionType.Value, "<Gamepad>/Left Stick"); |
|
|
|
move = new InputAction("Left Stick", InputActionType.Value, "<Gamepad>/leftStick"); |
|
|
|
move.AddCompositeBinding("2DVector") |
|
|
|
.With("Up", "<Keyboard>/w") |
|
|
|
.With("Down", "<Keyboard>/s") |
|
|
|
|
|
|
look = new InputAction("Right Stick", InputActionType.Value, "<Gamepad>/Right Stick"); |
|
|
|
look = new InputAction("Right Stick", InputActionType.Value, "<Gamepad>/rightStick"); |
|
|
|
jump = new InputAction("Jump", InputActionType.Button, "<Gamepad>/Button South"); |
|
|
|
jump = new InputAction("Jump", InputActionType.Button, "<Gamepad>/buttonSouth"); |
|
|
|
#if UNITY_EDITOR
|
|
|
|
UnityEditor.EditorUtility.SetDirty(this); |
|
|
|
#endif
|
|
|
|
} |
|
|
|
#endif
|
|
|
|
public override void UpdateInput() |
|
|
|