draft options working; spells won't cast though
This commit is contained in:
parent
2429efbf6a
commit
7cf15dcaa6
37 changed files with 1340 additions and 0 deletions
29
Assets/_Project/Scripts/Gameplay/SpellHotkeys.cs
Normal file
29
Assets/_Project/Scripts/Gameplay/SpellHotkeys.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Assets/_Project/Scripts/Gameplay/SpellHotkeys.cs
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace TD.Gameplay
|
||||
{
|
||||
/// <summary>
|
||||
/// The fixed key bound to each spell hotkey slot (slot index == grant order ==
|
||||
/// <see cref="PlayerSpellLoadout"/> list index). Shared by
|
||||
/// <see cref="BuilderSpellCastController"/> (reads input) and the HUD hotbar (renders key
|
||||
/// labels) so the two can never drift apart.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <see cref="TD.UI.HUDController"/>'s <c>HotkeyLayout</c> already claims the entire
|
||||
/// Q/W/E/R/T/A/S/D/F/G/Z/X/C/V/B block for the build command grid, so spell casting uses
|
||||
/// the number row instead.
|
||||
/// </remarks>
|
||||
public static class SpellHotkeys
|
||||
{
|
||||
public static readonly Key[] Layout =
|
||||
{
|
||||
Key.Digit1,
|
||||
Key.Digit2,
|
||||
Key.Digit3,
|
||||
Key.Digit4,
|
||||
};
|
||||
|
||||
public static int MaxSpellSlots => Layout.Length;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue