Added lifetime to bullets

This commit is contained in:
Marco 2025-02-20 16:22:05 +01:00
commit 78c319224a
7 changed files with 50 additions and 2 deletions

View file

@ -13,6 +13,8 @@ namespace Cirno.Scripts.AttackPatterns;
public partial class SpiralPattern : AttackPattern
{
[Export] public PackedScene BulletScene;
[Export] private float _bulletLifeTime = 20f;
[Export] private bool _destroyOnCollision = false;
[Export] private float bulletSpeed = 5f;
[Export] private int bulletCount = 16;
[Export] private float rotationSpeed = 0f;
@ -89,6 +91,8 @@ public partial class SpiralPattern : AttackPattern
{
Position = position,
Direction = direction,
LifeTime = _bulletLifeTime,
DestroyOnCollision = _destroyOnCollision,
Speed = bulletSpeed,
Owner = owner,
DamageType = _damageType,