/// <summary> /// 添加新的触发器 /// </summary> /// <param name="action"></param> public void OnStartAction(OperaterNode action) { startedActions.Add(action); //if(action is IRuntimeCtrl) //{ // if (onCtrlStart != null) // onCtrlStart.Invoke((action as IRuntimeCtrl).CtrlType); //} }
public override void OnUnDoExecuteInternal(OperaterNode node) { if (eventCtrl == null) { eventCtrl = node.Command.Context.GetComponentInParent <ActionGroup>().EventCtrl; } base.OnUnDoExecuteInternal(node); if (noticeAuto) { SetElementState(false); } }
public override void OnBeforeEnd(OperaterNode node, bool force) { if (eventCtrl == null) { eventCtrl = node.Command.Context.GetComponentInParent <ActionGroup>().EventCtrl; } base.OnBeforeEnd(node, force); if (noticeAuto) { SetElementState(false); } }
/// <summary> /// 移除触发器 /// </summary> /// <param name="action"></param> public void OnStopAction(OperaterNode action) { startedActions.Remove(action); //if (action is IRuntimeCtrl) //{ // var otherAction = from node in startedActions // where node is IRuntimeCtrl // where (node as IRuntimeCtrl).CtrlType == (action as IRuntimeCtrl).CtrlType // select node; // if(otherAction.Count() == 0 && onCtrlStop != null) // { // onCtrlStop.Invoke((action as IRuntimeCtrl).CtrlType); // } //} }