mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:05:34 +00:00
Conveyor belts
This commit is contained in:
parent
30aa34c105
commit
362ea29852
16 changed files with 371 additions and 15 deletions
|
|
@ -102,14 +102,24 @@ public partial class Active : PlayerStateBase
|
|||
}
|
||||
|
||||
public override void PhysicsProcessState(double delta)
|
||||
{
|
||||
MainObject.Velocity = _movementDirection * MovementSpeed;
|
||||
{
|
||||
// Reset at start of frame
|
||||
MainObject.Velocity = Vector2.Zero;
|
||||
|
||||
// Process modules
|
||||
base.PhysicsProcessState(delta);
|
||||
|
||||
MainObject.Velocity += _movementDirection * MovementSpeed;
|
||||
|
||||
MainObject.MoveAndSlide();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void ProcessState(double delta)
|
||||
{
|
||||
base.ProcessState(delta);
|
||||
|
||||
_movementDirection = _inputProvider.GetMovementInput().Normalized();
|
||||
_isStrafing = _inputProvider.GetStrafePressed();
|
||||
|
||||
|
|
@ -152,6 +162,8 @@ public partial class Active : PlayerStateBase
|
|||
//CallDeferred(MethodName.PauseDeferred);
|
||||
PauseDeferred();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void PauseDeferred()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue