浏览代码

Fixed Syntax + Dirtying for Initialize Values in Simple Player Input

/main
Thomas ICHÉ 4 年前
当前提交
378aa129
共有 1 个文件被更改,包括 10 次插入4 次删除
  1. 14
      Runtime/Controllers/SimplePlayerInput.cs

14
Runtime/Controllers/SimplePlayerInput.cs


#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()

正在加载...
取消
保存