IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/Utility/ForceFinishGraph.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

23 lines
633 B
C#

using ParadoxNotion;
using ParadoxNotion.Design;
using NodeCanvas.Framework;
namespace NodeCanvas.Tasks.Actions
{
[Category("✫ Utility")]
[Description("Force Finish the current graph this Task is assigned to.")]
public class ForceFinishGraph : ActionTask
{
public CompactStatus finishStatus = CompactStatus.Success;
protected override void OnExecute() {
var graph = ownerSystem as Graph;
if ( graph != null ) {
graph.Stop(finishStatus == CompactStatus.Success);
}
EndAction(finishStatus == CompactStatus.Success);
}
}
}