コード例 #1
0
 /// <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);
     //}
 }
コード例 #2
0
        public override void OnUnDoExecuteInternal(OperaterNode node)
        {
            if (eventCtrl == null)
            {
                eventCtrl = node.Command.Context.GetComponentInParent <ActionGroup>().EventCtrl;
            }

            base.OnUnDoExecuteInternal(node);
            if (noticeAuto)
            {
                SetElementState(false);
            }
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 /// <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);
     //    }
     //}
 }