完成交互逻辑

This commit is contained in:
2025-05-20 00:22:31 +08:00
parent 84d13e8981
commit b0abc1c30a
63 changed files with 42664 additions and 42166 deletions

View File

@@ -165,6 +165,15 @@ namespace NBF
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Use2"",
""type"": ""Button"",
""id"": ""45a833e1-2aaf-4907-ae1e-1d97ee260b18"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""SelectItem"",
""type"": ""Button"",
@@ -407,15 +416,6 @@ namespace NBF
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""ReUse"",
""type"": ""Button"",
""id"": ""45a833e1-2aaf-4907-ae1e-1d97ee260b18"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
@@ -998,7 +998,7 @@ namespace NBF
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""ReUse"",
""action"": ""Use2"",
""isComposite"": false,
""isPartOfComposite"": false
}
@@ -1106,6 +1106,7 @@ namespace NBF
m_Normal_Op1 = m_Normal.FindAction("Op1", throwIfNotFound: true);
m_Normal_Op2 = m_Normal.FindAction("Op2", throwIfNotFound: true);
m_Normal_Use = m_Normal.FindAction("Use", throwIfNotFound: true);
m_Normal_Use2 = m_Normal.FindAction("Use2", throwIfNotFound: true);
m_Normal_SelectItem = m_Normal.FindAction("SelectItem", throwIfNotFound: true);
m_Normal_SelectBait = m_Normal.FindAction("SelectBait", throwIfNotFound: true);
m_Normal_SelectFood = m_Normal.FindAction("SelectFood", throwIfNotFound: true);
@@ -1133,7 +1134,6 @@ namespace NBF
m_Normal_Quick8 = m_Normal.FindAction("Quick8", throwIfNotFound: true);
m_Normal_Quick9 = m_Normal.FindAction("Quick9", throwIfNotFound: true);
m_Normal_Back = m_Normal.FindAction("Back", throwIfNotFound: true);
m_Normal_ReUse = m_Normal.FindAction("ReUse", throwIfNotFound: true);
// UI
m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
m_UI_Roll = m_UI.FindAction("Roll", throwIfNotFound: true);
@@ -1226,6 +1226,7 @@ namespace NBF
private readonly InputAction m_Normal_Op1;
private readonly InputAction m_Normal_Op2;
private readonly InputAction m_Normal_Use;
private readonly InputAction m_Normal_Use2;
private readonly InputAction m_Normal_SelectItem;
private readonly InputAction m_Normal_SelectBait;
private readonly InputAction m_Normal_SelectFood;
@@ -1253,7 +1254,6 @@ namespace NBF
private readonly InputAction m_Normal_Quick8;
private readonly InputAction m_Normal_Quick9;
private readonly InputAction m_Normal_Back;
private readonly InputAction m_Normal_ReUse;
/// <summary>
/// Provides access to input actions defined in input action map "Normal".
/// </summary>
@@ -1298,6 +1298,10 @@ namespace NBF
/// </summary>
public InputAction @Use => m_Wrapper.m_Normal_Use;
/// <summary>
/// Provides access to the underlying input action "Normal/Use2".
/// </summary>
public InputAction @Use2 => m_Wrapper.m_Normal_Use2;
/// <summary>
/// Provides access to the underlying input action "Normal/SelectItem".
/// </summary>
public InputAction @SelectItem => m_Wrapper.m_Normal_SelectItem;
@@ -1406,10 +1410,6 @@ namespace NBF
/// </summary>
public InputAction @Back => m_Wrapper.m_Normal_Back;
/// <summary>
/// Provides access to the underlying input action "Normal/ReUse".
/// </summary>
public InputAction @ReUse => m_Wrapper.m_Normal_ReUse;
/// <summary>
/// Provides access to the underlying input action map instance.
/// </summary>
public InputActionMap Get() { return m_Wrapper.m_Normal; }
@@ -1459,6 +1459,9 @@ namespace NBF
@Use.started += instance.OnUse;
@Use.performed += instance.OnUse;
@Use.canceled += instance.OnUse;
@Use2.started += instance.OnUse2;
@Use2.performed += instance.OnUse2;
@Use2.canceled += instance.OnUse2;
@SelectItem.started += instance.OnSelectItem;
@SelectItem.performed += instance.OnSelectItem;
@SelectItem.canceled += instance.OnSelectItem;
@@ -1540,9 +1543,6 @@ namespace NBF
@Back.started += instance.OnBack;
@Back.performed += instance.OnBack;
@Back.canceled += instance.OnBack;
@ReUse.started += instance.OnReUse;
@ReUse.performed += instance.OnReUse;
@ReUse.canceled += instance.OnReUse;
}
/// <summary>
@@ -1578,6 +1578,9 @@ namespace NBF
@Use.started -= instance.OnUse;
@Use.performed -= instance.OnUse;
@Use.canceled -= instance.OnUse;
@Use2.started -= instance.OnUse2;
@Use2.performed -= instance.OnUse2;
@Use2.canceled -= instance.OnUse2;
@SelectItem.started -= instance.OnSelectItem;
@SelectItem.performed -= instance.OnSelectItem;
@SelectItem.canceled -= instance.OnSelectItem;
@@ -1659,9 +1662,6 @@ namespace NBF
@Back.started -= instance.OnBack;
@Back.performed -= instance.OnBack;
@Back.canceled -= instance.OnBack;
@ReUse.started -= instance.OnReUse;
@ReUse.performed -= instance.OnReUse;
@ReUse.canceled -= instance.OnReUse;
}
/// <summary>
@@ -1920,6 +1920,13 @@ namespace NBF
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnUse(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Use2" 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 OnUse2(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "SelectItem" 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" />
@@ -2108,13 +2115,6 @@ namespace NBF
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnBack(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "ReUse" 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 OnReUse(InputAction.CallbackContext context);
}
/// <summary>
/// Interface to implement callback methods for all input action callbacks associated with input actions defined by "UI" which allows adding and removing callbacks.