mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-03 18:55:54 +00:00
Pattern inversion
This commit is contained in:
parent
019f7d7ca0
commit
690bae01bc
2 changed files with 34 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue