gd: added bonus jump height if jumping right after dash, and time scale on aiming in air
This commit is contained in:
@ -178,7 +178,7 @@ public partial class MoveSystem : Node3D
|
||||
}
|
||||
}
|
||||
|
||||
public void Jump(bool isDoubleJump, Vector3? jumpDirection = null)
|
||||
public void Jump(bool isDoubleJump, Vector3? jumpDirection = null, float boost = 1.0f)
|
||||
{
|
||||
var effectiveJumpDirection = jumpDirection ?? Vector3.Up;
|
||||
var jumpForce = isDoubleJump
|
||||
@ -186,7 +186,7 @@ public partial class MoveSystem : Node3D
|
||||
: _gravity.CalculateJumpForce();
|
||||
|
||||
var currentHorizontalVelocity = new Vector3(_parent.Velocity.X, 0, _parent.Velocity.Z);
|
||||
var jumpVelocity = jumpForce * effectiveJumpDirection;
|
||||
var jumpVelocity = jumpForce * effectiveJumpDirection * boost;
|
||||
_parent.Velocity = currentHorizontalVelocity + jumpVelocity;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user