Pattern inversion

This commit is contained in:
Marco 2025-02-09 10:02:06 +01:00
commit 690bae01bc
2 changed files with 34 additions and 9 deletions

View file

@ -17,6 +17,8 @@ public partial class SpeedModifier : Resource, IBulletModifier
return baseSpeed;
float t = (float)bulletIndex / (totalBullets - 1); // Normalize to [0,1]
if (Invert)
t = 1 - t;
t = ApplyEasing(t);
return Mathf.Lerp(MinimumSpeed, baseSpeed, t);