按键绑定和重置以及加载功能
This commit is contained in:
@@ -1106,6 +1106,15 @@ namespace NBF
|
||||
""processors"": """",
|
||||
""interactions"": ""Hold"",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Reset"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""b8805b50-7544-4249-b3b8-f6554dfb7a93"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -1438,6 +1447,17 @@ namespace NBF
|
||||
""action"": ""Up"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""3069f356-c73e-4bac-88f5-88bd6d746bc2"",
|
||||
""path"": ""<Keyboard>/r"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Reset"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1556,6 +1576,7 @@ namespace NBF
|
||||
m_UI_Left = m_UI.FindAction("Left", throwIfNotFound: true);
|
||||
m_UI_Down = m_UI.FindAction("Down", throwIfNotFound: true);
|
||||
m_UI_Up = m_UI.FindAction("Up", throwIfNotFound: true);
|
||||
m_UI_Reset = m_UI.FindAction("Reset", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@PlayerInputControl()
|
||||
@@ -2129,6 +2150,7 @@ namespace NBF
|
||||
private readonly InputAction m_UI_Left;
|
||||
private readonly InputAction m_UI_Down;
|
||||
private readonly InputAction m_UI_Up;
|
||||
private readonly InputAction m_UI_Reset;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "UI".
|
||||
/// </summary>
|
||||
@@ -2185,6 +2207,10 @@ namespace NBF
|
||||
/// </summary>
|
||||
public InputAction @Up => m_Wrapper.m_UI_Up;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "UI/Reset".
|
||||
/// </summary>
|
||||
public InputAction @Reset => m_Wrapper.m_UI_Reset;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_UI; }
|
||||
@@ -2243,6 +2269,9 @@ namespace NBF
|
||||
@Up.started += instance.OnUp;
|
||||
@Up.performed += instance.OnUp;
|
||||
@Up.canceled += instance.OnUp;
|
||||
@Reset.started += instance.OnReset;
|
||||
@Reset.performed += instance.OnReset;
|
||||
@Reset.canceled += instance.OnReset;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2287,6 +2316,9 @@ namespace NBF
|
||||
@Up.started -= instance.OnUp;
|
||||
@Up.performed -= instance.OnUp;
|
||||
@Up.canceled -= instance.OnUp;
|
||||
@Reset.started -= instance.OnReset;
|
||||
@Reset.performed -= instance.OnReset;
|
||||
@Reset.canceled -= instance.OnReset;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2729,6 +2761,13 @@ namespace NBF
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnUp(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Reset" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnReset(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user