Updates to spells, HUD, Gold, and Camera Controls. New sound effects!
This commit is contained in:
parent
689fe7be88
commit
a33d951abd
27 changed files with 578 additions and 68 deletions
|
|
@ -227,16 +227,17 @@ namespace TD.Gameplay
|
|||
{
|
||||
Vector2 dir = Vector2.zero;
|
||||
|
||||
// Keyboard: WASD + arrow keys. Suppressed entirely while the player
|
||||
// is typing — pressing 'a' or 'w' into chat should not pan the camera.
|
||||
// (Edge-pan below stays active since it's mouse-driven.)
|
||||
// Keyboard: arrow keys only. WASD is reserved for tower-build hotkeys (the command
|
||||
// grid) — camera panning is arrow keys plus the mouse edge-pan below. Suppressed
|
||||
// entirely while the player is typing so arrow keys in chat navigate text instead of
|
||||
// panning. (Edge-pan below stays active since it's mouse-driven.)
|
||||
var kb = HUDController.IsTextInputActive ? null : Keyboard.current;
|
||||
if (kb != null)
|
||||
{
|
||||
if (kb.aKey.isPressed || kb.leftArrowKey.isPressed) dir.x -= 1f;
|
||||
if (kb.dKey.isPressed || kb.rightArrowKey.isPressed) dir.x += 1f;
|
||||
if (kb.sKey.isPressed || kb.downArrowKey.isPressed) dir.y -= 1f;
|
||||
if (kb.wKey.isPressed || kb.upArrowKey.isPressed) dir.y += 1f;
|
||||
if (kb.leftArrowKey.isPressed) dir.x -= 1f;
|
||||
if (kb.rightArrowKey.isPressed) dir.x += 1f;
|
||||
if (kb.downArrowKey.isPressed) dir.y -= 1f;
|
||||
if (kb.upArrowKey.isPressed) dir.y += 1f;
|
||||
}
|
||||
|
||||
// Edge-pan: mouse near screen edge adds to keyboard direction.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue