gd: added bonus jump height if jumping right after dash, and time scale on aiming in air

This commit is contained in:
2025-06-10 20:24:35 +02:00
parent c50f248c9d
commit cb4c16a3ca
4 changed files with 50 additions and 7 deletions

View File

@ -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;
}