Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / effects / Effect1.cs
@小李xl 小李xl on 19 Apr 2023 423 bytes 添加生成标记敌人和武器的特效
using Godot;

public partial class Effect1 : GpuParticles2D
{
    public override async void _Ready()
    {
        var c = GetNode<GpuParticles2D>("GPUParticles2D");
        c.Amount = Utils.RandomRangeInt(2, 6);
        c.Emitting = true;
        Emitting = true;

        var sceneTreeTimer = GetTree().CreateTimer(1f);
        await ToSignal(sceneTreeTimer, Timer.SignalName.Timeout);
        QueueFree();
    }
    
}