knockback component

This commit is contained in:
2026-01-18 12:39:01 +01:00
parent 9690280cd7
commit 35b9ea383c
21 changed files with 180 additions and 49 deletions

View File

@@ -6,6 +6,8 @@ public partial class RMovement : Resource
{
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float Speed;
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
public float Acceleration;
[Export(PropertyHint.Range, "0,20,1,or_greater")]
public float TargetHeight;
@@ -13,11 +15,13 @@ public partial class RMovement : Resource
public RMovement()
{
Speed = 3.0f;
Acceleration = 1.0f;
TargetHeight = 10.0f;
}
public RMovement(float speed, float targetHeight)
public RMovement(float speed, float acceleration, float targetHeight)
{
Speed = speed;
Acceleration = acceleration;
TargetHeight = targetHeight;
}
}