using System.Collections; using System.Collections.Generic; using UnityEngine; //VR交互类型的步骤节点 public class VRInterStepNode : StepNodeBase { //VRGrabInterractableBase interractableBase; IStepNodeAction nodeAction;//节点具体实现管理 // Start is called before the first frame update protected override void Awake() { base.Awake(); //interractableBase = this.GetComponent(); nodeAction = this.GetComponent(); if (nodeAction == null) Debug.LogError(NodeName + " " + this.gameObject.name + "操作节点未找到Action行为实现"); } //流程节点激活时激活该节点的全部操作步骤点 并注册操作步骤点完成事件 protected override void Active() { nodeActiceState = NodeActiceState.active; if (autoFinishedStep) //自动完成的节点 无需行为调用结束 激活时自行调用即可 { nodeAction?.Active(currentProcess, null); NodeFinised(); } else { nodeAction?.Active(currentProcess, NodeFinised); } } //节点操作完成时调用激活状态 protected override void UnActive() { nodeActiceState = NodeActiceState.unActice; nodeAction?.UnActive(currentProcess); } }