IndieGame/client/Assets/ParadoxNotion/NodeCanvas/_DeprecatedFiles/Legacy_GoToNode.cs

27 lines
689 B
C#
Raw Normal View History

2024-10-11 10:12:15 +08:00
using NodeCanvas.Framework;
using UnityEngine;
namespace NodeCanvas.DialogueTrees
{
[System.Obsolete("Use Jumpers instead")]
public class GoToNode : DTNode
{
[SerializeField]
private DTNode _targetNode = null;
public override int maxOutConnections { get { return 0; } }
public override bool requireActorSelection { get { return false; } }
protected override Status OnExecute(Component agent, IBlackboard bb) {
if ( _targetNode == null ) {
return Error("Target node of GOTO node is null");
}
DLGTree.EnterNode(_targetNode);
return Status.Success;
}
}
}