Add more interactive effects to inventory menu

This commit is contained in:
2024-09-10 19:40:19 -07:00
parent 081bde1d9a
commit d854f159b4
21 changed files with 279 additions and 112 deletions

View File

@@ -84,7 +84,7 @@ namespace GameJamDungeon
public void Setup()
{
Settings = new PlayerLogic.Settings(RotationSpeed, MoveSpeed);
Settings = new PlayerLogic.Settings() { RotationSpeed = RotationSpeed, MoveSpeed = MoveSpeed };
PlayerLogic = new PlayerLogic();
PlayerLogic.Set(this as IPlayer);
@@ -136,8 +136,13 @@ namespace GameJamDungeon
public override void _UnhandledInput(InputEvent @event)
{
if (Input.IsActionJustPressed(GameInputs.Attack))
if (@event.IsActionPressed(GameInputs.Attack))
PlayerLogic.Input(new PlayerLogic.Input.Attack());
if (@event.IsActionPressed(GameInputs.Sprint))
Settings.MoveSpeed *= 4;
if (@event.IsActionReleased(GameInputs.Sprint))
Settings.MoveSpeed /= 4;
}
private void OnEnemyHitBoxEntered(Area3D area)