UI 系统

This commit is contained in:
2026-06-09 10:41:43 +08:00
parent 247de307c6
commit e09bee31ec
31 changed files with 221439 additions and 997 deletions

View File

@@ -768,6 +768,15 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Inventory"",
""type"": ""Button"",
""id"": ""a1b2c3d4-e5f6-0001-0002-000000000201"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
@@ -1298,6 +1307,28 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
""action"": ""QuickMap"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""a1b2c3d4-e5f6-0001-0002-000000000202"",
""path"": ""<Keyboard>/tab"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard&Mouse"",
""action"": ""Inventory"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""a1b2c3d4-e5f6-0001-0002-000000000203"",
""path"": ""<Gamepad>/select"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Inventory"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
@@ -1370,6 +1401,7 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
m_UI_InventoryTabNext = m_UI.FindAction("InventoryTabNext", throwIfNotFound: true);
m_UI_InventoryTabPrev = m_UI.FindAction("InventoryTabPrev", throwIfNotFound: true);
m_UI_QuickMap = m_UI.FindAction("QuickMap", throwIfNotFound: true);
m_UI_Inventory = m_UI.FindAction("Inventory", throwIfNotFound: true);
}
~@PlayerInputActions()
@@ -1760,6 +1792,7 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
private readonly InputAction m_UI_InventoryTabNext;
private readonly InputAction m_UI_InventoryTabPrev;
private readonly InputAction m_UI_QuickMap;
private readonly InputAction m_UI_Inventory;
/// <summary>
/// Provides access to input actions defined in input action map "UI".
/// </summary>
@@ -1832,6 +1865,10 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
/// </summary>
public InputAction @QuickMap => m_Wrapper.m_UI_QuickMap;
/// <summary>
/// Provides access to the underlying input action "UI/Inventory".
/// </summary>
public InputAction @Inventory => m_Wrapper.m_UI_Inventory;
/// <summary>
/// Provides access to the underlying input action map instance.
/// </summary>
public InputActionMap Get() { return m_Wrapper.m_UI; }
@@ -1902,6 +1939,9 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
@QuickMap.started += instance.OnQuickMap;
@QuickMap.performed += instance.OnQuickMap;
@QuickMap.canceled += instance.OnQuickMap;
@Inventory.started += instance.OnInventory;
@Inventory.performed += instance.OnInventory;
@Inventory.canceled += instance.OnInventory;
}
/// <summary>
@@ -1958,6 +1998,9 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
@QuickMap.started -= instance.OnQuickMap;
@QuickMap.performed -= instance.OnQuickMap;
@QuickMap.canceled -= instance.OnQuickMap;
@Inventory.started -= instance.OnInventory;
@Inventory.performed -= instance.OnInventory;
@Inventory.canceled -= instance.OnInventory;
}
/// <summary>
@@ -2270,5 +2313,12 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnQuickMap(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Inventory" 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 OnInventory(InputAction.CallbackContext context);
}
}