Made bullet creation modifier generics

This commit is contained in:
Marco 2025-02-13 14:32:24 +01:00
commit 797e24d766
7 changed files with 46 additions and 10 deletions

View file

@ -17,7 +17,7 @@ public partial class TargetedPattern : AttackPattern
[Export] private int bulletsPerShot = 1;
[Export] private float spread = 0f;
[Export] private BulletOwner owner = BulletOwner.Enemy;
[Export] private Resource modifier;
[Export] private BulletCreationModifier modifier;
private double timer;
private double burstTimer;
@ -42,7 +42,7 @@ public partial class TargetedPattern : AttackPattern
burstTimer += delta;
if (timer < duration && burstTimer >= burstInterval && _gameManager.PlayerPosition.HasValue)
{
spawner.SpawnTargetedBullet(Boss.GlobalPosition, _gameManager.PlayerPosition.Value, bulletSpeed, owner, BulletScene, bulletsPerShot, spread, modifier as IBulletModifier);
spawner.SpawnTargetedBullet(Boss.GlobalPosition, _gameManager.PlayerPosition.Value, bulletSpeed, owner, BulletScene, bulletsPerShot, spread, modifier);
burstTimer = 0;
}
}