27 lines
416 B
C#
27 lines
416 B
C#
|
|
using Godot;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Rokojori
|
|
{
|
|
[Tool][GlobalClass]
|
|
public partial class RemoveNode : Action
|
|
{
|
|
[Export]
|
|
public Node target;
|
|
|
|
[Export]
|
|
public bool queue = true;
|
|
|
|
protected override void _OnTrigger()
|
|
{
|
|
if ( target == null )
|
|
{
|
|
return;
|
|
}
|
|
|
|
target.SelfDestroy( queue );
|
|
|
|
}
|
|
}
|
|
} |