first commit

This commit is contained in:
Chris
2025-03-12 14:22:16 -04:00
commit 0ad0c01249
1999 changed files with 189708 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;
namespace NodeCanvas.Tasks.Actions
{
[Category("GameObject")]
public class DestroyGameObject : ActionTask<Transform>
{
[Tooltip("DestroyImmediately is recomended if you are destroying objects in use of the framework.")]
public bool immediately;
protected override string info {
get { return string.Format("Destroy {0}", agentInfo); }
}
//in case it destroys self
protected override void OnUpdate() {
if ( immediately ) {
Object.DestroyImmediate(agent.gameObject);
} else {
Object.Destroy(agent.gameObject);
}
EndAction();
}
}
}