complete project reorganization
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 55s
Create tag and build when new code gets to main / Test (push) Successful in 7m7s
Create tag and build when new code gets to main / Export (push) Successful in 9m56s

This commit is contained in:
2026-02-04 11:20:00 +01:00
parent b6e8d0b590
commit cd519e528f
824 changed files with 397 additions and 16380 deletions

View File

@@ -0,0 +1,32 @@
using Godot;
namespace Movementtests.player_controller.Scripts;
public partial class Gravity: Node3D
{
[Export(PropertyHint.Range, "0,10,0.01,or_greater")]
public float Weight { get; set; } = 3.0f;
[Export(PropertyHint.Range, "0,2,0.01,or_greater")]
public float StartVelocity { get; set; } = 1.0f;
[Export(PropertyHint.Range, "0.1,10,0.1,or_greater")]
public float DoubleJumpSpeedFactor { get; set; } = 2f;
[Export(PropertyHint.Range, "0.1,10,0.1,or_greater")]
public float JumpFromDashSpeedFactor { get; set; } = 2f;
[Export(PropertyHint.Range, "0.1,10,0.1,or_greater")]
public float JumpFromWallSpeedFactor { get; set; } = 2f;
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
public float AdditionalGravityPower { get; set; } = 1f;
private float _gravity;
public void Init(float gravitySetting)
{
_gravity = gravitySetting;
}
public float CalculateJumpForce() => _gravity * (StartVelocity / AdditionalGravityPower);
public float CalculateJumpFromDashForce() => CalculateJumpForce() * JumpFromDashSpeedFactor;
public float CalculateJumpFromWallForce() => CalculateJumpForce() * JumpFromWallSpeedFactor;
public float CalculateDoubleJumpForce() => CalculateJumpForce() * DoubleJumpSpeedFactor;
public float CalculateGravityForce() => _gravity * Weight;
}