mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-06 13:05:54 +00:00
Inventory close and open by button
This commit is contained in:
parent
0687b6de99
commit
80a13d047d
11 changed files with 165 additions and 53 deletions
|
|
@ -31,6 +31,8 @@ public partial class KeyboardInputProvider : InputProvider
|
|||
[Export] private string _strafeActionName = "strafe";
|
||||
[Export] private string _nextWeaponActionName = "next_weapon";
|
||||
[Export] private string _previousWeaponActionName = "previous_weapon";
|
||||
[Export] private string _inventoryActionName = "inventory";
|
||||
[Export] private string _pauseActionName = "pause";
|
||||
|
||||
public override Vector2 GetMovementInput()
|
||||
{
|
||||
|
|
@ -60,10 +62,20 @@ public partial class KeyboardInputProvider : InputProvider
|
|||
return Input.IsActionPressed(action);
|
||||
}
|
||||
|
||||
public override bool GetInventoryJustPressed()
|
||||
{
|
||||
return GetActionJustPressed(_inventoryActionName);
|
||||
}
|
||||
|
||||
public override bool GetShootPressed()
|
||||
{
|
||||
return GetActionPressed(_shootActionName);
|
||||
}
|
||||
|
||||
public override bool GetShootJustPressed()
|
||||
{
|
||||
return GetActionJustPressed(_shootActionName);
|
||||
}
|
||||
|
||||
public override bool GetUseJustPressed()
|
||||
{
|
||||
|
|
@ -89,4 +101,9 @@ public partial class KeyboardInputProvider : InputProvider
|
|||
return GetActionJustPressed(_previousWeaponActionName);
|
||||
}
|
||||
|
||||
public override bool GetPauseJustPressed()
|
||||
{
|
||||
return GetActionJustPressed(_pauseActionName);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue