mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 08:35:55 +00:00
New Modifier
This commit is contained in:
parent
50c111ee28
commit
019f7d7ca0
18 changed files with 423 additions and 45 deletions
|
|
@ -11,11 +11,13 @@ public partial class SpiralPattern : AttackPattern
|
|||
[Export] public PackedScene BulletScene;
|
||||
[Export] private float bulletSpeed = 5f;
|
||||
[Export] private int bulletCount = 16;
|
||||
[Export] private float rotationSpeed = 90f;
|
||||
[Export] private float rotationSpeed = 0f;
|
||||
[Export] private float _rotationOffset = 0f;
|
||||
[Export] private float duration = 5f;
|
||||
[Export] private float burstInterval = 0.5f;
|
||||
[Export] private float spread = 360f;
|
||||
[Export] private BulletOwner owner = BulletOwner.Enemy;
|
||||
[Export] private Resource _modifier;
|
||||
|
||||
private double timer;
|
||||
private double burstTimer;
|
||||
|
|
@ -35,7 +37,22 @@ public partial class SpiralPattern : AttackPattern
|
|||
burstTimer += delta;
|
||||
if (timer < duration && burstTimer >= burstInterval)
|
||||
{
|
||||
spawner.SpawnSpiralPattern(Boss.GlobalPosition, bulletSpeed, owner, bulletCount, rotationSpeed, timer, spread, BulletScene);
|
||||
float angleOffset = (float)(rotationSpeed * timer);
|
||||
|
||||
spawner.SpawnBullet(new BulletInfo()
|
||||
{
|
||||
Position = Boss.GlobalPosition,
|
||||
Direction = Vector2.Right,
|
||||
Speed = bulletSpeed,
|
||||
Owner = owner,
|
||||
BulletCount = bulletCount,
|
||||
Spread = spread,
|
||||
BulletScene = BulletScene,
|
||||
RotationOffset = _rotationOffset,
|
||||
Modifier = _modifier as IBulletModifier,
|
||||
});
|
||||
|
||||
// spawner.SpawnSpiralPattern(Boss.GlobalPosition, bulletSpeed, owner, bulletCount, rotationSpeed, timer, spread, BulletScene);
|
||||
burstTimer = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue