mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 13:25:54 +00:00
Made bullet creation modifier generics
This commit is contained in:
parent
9ae07e5b38
commit
797e24d766
7 changed files with 46 additions and 10 deletions
|
|
@ -3,7 +3,7 @@
|
|||
namespace Cirno.Scripts.Resources;
|
||||
|
||||
[GlobalClass]
|
||||
public partial class SpeedModifier : Resource, IBulletModifier
|
||||
public partial class SpeedModifier : BulletCreationModifier, IBulletModifier
|
||||
{
|
||||
[Export] public SpeedModifierType ModifierType;
|
||||
[Export] public EasingType Easing;
|
||||
|
|
@ -11,7 +11,7 @@ public partial class SpeedModifier : Resource, IBulletModifier
|
|||
[Export] public float MinimumSpeed = 10f;
|
||||
[Export] public float ScalingFactor = 10.0f;
|
||||
|
||||
public float ModifySpeed(float baseSpeed, int bulletIndex, int totalBullets)
|
||||
public override float ModifySpeed(float baseSpeed, int bulletIndex, int totalBullets)
|
||||
{
|
||||
if (totalBullets <= 1)
|
||||
return baseSpeed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue