mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:45:33 +00:00
14 lines
No EOL
357 B
C#
14 lines
No EOL
357 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Resources;
|
|
|
|
[GlobalClass]
|
|
public partial class DecreasingSpeedModifier : Resource, IBulletModifier
|
|
{
|
|
[Export] private float decreaseRate = 0.1f;
|
|
|
|
public float ModifySpeed(float baseSpeed, int bulletIndex, int totalBullets)
|
|
{
|
|
return Mathf.Max(0, baseSpeed - (decreaseRate * bulletIndex));
|
|
}
|
|
} |