Bullet freeze

This commit is contained in:
Marco 2025-04-26 11:24:20 +02:00
commit 34a07342ac
31 changed files with 255 additions and 8 deletions

View file

@ -18,4 +18,7 @@ public abstract partial class InputProvider : Node2D
public abstract bool GetWeaponNextJustPressed();
public abstract bool GetWeaponPreviousJustPressed();
public abstract bool GetPauseJustPressed();
public abstract bool GetFreezeJustPressed();
public abstract bool GetFreezePressed();
}

View file

@ -35,6 +35,7 @@ public partial class KeyboardInputProvider : InputProvider
[Export] private StringName _previousWeaponActionName = "previous_weapon";
[Export] private StringName _inventoryActionName = "inventory";
[Export] private StringName _pauseActionName = "pause";
[Export] private StringName _freezeActionName = "Freeze";
private enum AimInputMethod { RightStick, Mouse }
private AimInputMethod _lastUsedInput = AimInputMethod.RightStick;
@ -163,5 +164,15 @@ public partial class KeyboardInputProvider : InputProvider
{
return GetActionJustPressed(_pauseActionName);
}
public override bool GetFreezeJustPressed()
{
return GetActionJustPressed(_freezeActionName);
}
public override bool GetFreezePressed()
{
return GetActionPressed(_freezeActionName);
}
}