Added offsets and remade modifiers system

This commit is contained in:
Marco 2025-05-09 11:46:58 +02:00
commit aab69fb609
16 changed files with 474 additions and 426 deletions

View file

@ -16,6 +16,8 @@ public partial class SpiralPattern : AttackPattern
{
[Export] public BulletResource BulletResource { get; set; }
[Export] public Vector2 EmitterOffset { get; set; } = Vector2.Zero;
//Export] public PackedScene BulletScene;
//[Export] private float _bulletLifeTime = 20f; // Switch to res
//[Export] private bool _destroyOnCollision = false; // Switch to res
@ -242,7 +244,7 @@ public partial class SpiralPattern : AttackPattern
}
}
var bullet = pattern.MakeBullet(Parent.GlobalPosition, pattern.bulletCount,
var bullet = pattern.MakeBullet(Parent.GlobalPosition + pattern.EmitterOffset, pattern.bulletCount,
pattern.spread, angleOffset);
bullet.Direction = direction;