mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Added offsets and remade modifiers system
This commit is contained in:
parent
881a4897da
commit
aab69fb609
16 changed files with 474 additions and 426 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Godot;
|
||||
using Cirno.Scripts.Components;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Resources;
|
||||
|
||||
|
|
@ -12,7 +13,13 @@ public partial class SpeedModifier : BulletCreationModifier, IBulletModifier
|
|||
[Export] public float MinimumSpeed = 10f;
|
||||
[Export] public float ScalingFactor = 10.0f;
|
||||
|
||||
public override float ModifySpeed(float baseSpeed, int bulletIndex, int totalBullets)
|
||||
public override BulletInfo ModifyBullet(BulletInfo bullet, int bulletIndex, int totalBullets)
|
||||
{
|
||||
bullet.Speed = ModifySpeed(bullet.OriginalBulletResource.BulletSpeed, bulletIndex, totalBullets);
|
||||
return bullet;
|
||||
}
|
||||
|
||||
public float ModifySpeed(float baseSpeed, int bulletIndex, int totalBullets)
|
||||
{
|
||||
if (totalBullets <= 1)
|
||||
return baseSpeed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue