mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-06 07:35:53 +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
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue