2023-06-13 02:55:30 -07:00
|
|
|
using Godot;
|
|
|
|
|
|
|
|
namespace SupaLidlGame.Extensions;
|
|
|
|
|
|
|
|
public static class Particles2D
|
|
|
|
{
|
|
|
|
public static void EmitOneShot(this GpuParticles2D particles)
|
|
|
|
{
|
|
|
|
particles.GetTree().CreateTimer(particles.Lifetime).Timeout += () =>
|
|
|
|
{
|
|
|
|
particles.QueueFree();
|
|
|
|
};
|
2023-07-23 23:39:20 -07:00
|
|
|
particles.Emitting = true;
|
2023-06-13 02:55:30 -07:00
|
|
|
}
|
|
|
|
}
|