Ability for enemies to shoot when controlled

This commit is contained in:
Marco 2025-02-25 17:29:24 +01:00
commit 2d6bcc5f00
10 changed files with 93 additions and 34 deletions

View file

@ -36,9 +36,14 @@ public abstract partial class MovementHandler : ActorModule
return _inputProviders.Aggregate(Vector2.Zero, (current, inputProvider) => current + inputProvider.GetAimInput());
}
public virtual bool GetStrafing()
public virtual bool GetActionJustPressed(string action)
{
return _inputProviders.Aggregate(false, (current, inputProvider) => current && inputProvider.GetStrafing());
return _inputProviders.Aggregate(false, (current, inputProvider) => current || inputProvider.GetActionJustPressed(action));
}
public virtual bool GetActionPressed(string action)
{
return _inputProviders.Aggregate(false, (current, inputProvider) => current || inputProvider.GetActionPressed(action));
}
}