file refactor

This commit is contained in:
Rendo 2025-07-11 22:35:36 +05:00
commit bffb012a26
175 changed files with 1086 additions and 1107 deletions

View file

@ -0,0 +1,22 @@
using Godot;
public partial class StandardParticles : Node2D
{
private int counter = 0;
private int counterMax = 0;
public override void _Ready()
{
foreach (GpuParticles2D emitter in GetChildren())
{
emitter.Emitting = true;
counterMax += 1;
emitter.Finished += MarkForDestruction;
}
}
public void MarkForDestruction()
{
if (Engine.IsEditorHint()) return;
if (++counter < counterMax) return;
QueueFree();
}
}