using System.Collections; using System.Collections.Generic; using UnityEngine; using XNode; using System; using Sirenix.OdinInspector; using System.Linq; namespace ChivaVR.State { /// /// 离开状态 /// public class ExitStateNode : StateNode { [Input] public Empty enter; public override void OnEnter() { NodePort enterPort = GetInputPort("enter"); if (enterPort.GetConnections().Count == 0) { return; } for (int i = 0; i < enterPort.GetConnections().Count; i++) { StateNode node = enterPort.GetConnection(i).node as StateNode; if (!node.IsFinished) return; } IsRuning = true; OnExit(); } /// /// 结束流程组 /// public override void OnExit() { StateGraph stateGraph = graph as StateGraph; Debug.Log("Exit" + stateGraph.name); stateGraph.ExitStateGraph(); } } }