mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
24 lines
No EOL
499 B
C#
24 lines
No EOL
499 B
C#
using Cirno.Scripts.Activables;
|
|
using Godot;
|
|
|
|
namespace Cirno.Scripts.Weapons;
|
|
|
|
public partial class AutoclearingBulletEmitter : BulletEmitter
|
|
{
|
|
[Export]
|
|
public float Timeout { get; private set; } = 5f;
|
|
|
|
private double _timeoutTimer = 0f;
|
|
|
|
public override void _Process(double delta)
|
|
{
|
|
base._Process(delta);
|
|
if (!IsEmitting) return;
|
|
_timeoutTimer += delta;
|
|
|
|
if (_timeoutTimer >= Timeout)
|
|
{
|
|
QueueFree();
|
|
}
|
|
}
|
|
} |