mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-15 18:03:46 +00:00
Better free movement
This commit is contained in:
parent
90d2a95fa8
commit
388747ccb3
7 changed files with 108 additions and 15 deletions
|
|
@ -28,7 +28,17 @@ public abstract partial class MovementHandler : Node2D
|
|||
|
||||
public virtual Vector2 AggregateInputProviders()
|
||||
{
|
||||
return _inputProviders.Aggregate(Vector2.Zero, (current, inputProvider) => current + inputProvider.GetMovementInput().Normalized());
|
||||
return _inputProviders.Aggregate(Vector2.Zero, (current, inputProvider) => current + inputProvider.GetMovementInput());
|
||||
}
|
||||
|
||||
public virtual Vector2 GetAimingDirection()
|
||||
{
|
||||
return _inputProviders.Aggregate(Vector2.Zero, (current, inputProvider) => current + inputProvider.GetAimInput());
|
||||
}
|
||||
|
||||
public virtual bool GetStrafing()
|
||||
{
|
||||
return _inputProviders.Aggregate(false, (current, inputProvider) => current && inputProvider.GetStrafing());
|
||||
}
|
||||
|
||||
public abstract void Move(double delta);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue