23 lines
510 B
C#
23 lines
510 B
C#
using Godot;
|
|
using MaxEffort.Code.Core;
|
|
|
|
namespace MaxEffort.Code.Systems;
|
|
|
|
[GlobalClass]
|
|
public partial class PlayerInputSystem : Node
|
|
{
|
|
private const string LiftAction = "lift_action";
|
|
|
|
public override void _Process(double delta)
|
|
{
|
|
if (Input.IsActionPressed(LiftAction))
|
|
{
|
|
EventBus.PublishLiftEffortApplied((float)delta);
|
|
}
|
|
|
|
if (Input.IsActionJustReleased(LiftAction))
|
|
{
|
|
EventBus.PublishFocusRelease();
|
|
}
|
|
}
|
|
} |