示例#1
0
        override protected int doTick(BevNodeInputParam input,
                                      BevNodeOutputParam output)
        {
            int isFinish = BRS_FINISH;

            if (checkIndex(_currentSelectedIndex))
            {
                if (_currentSelectedIndex != _lastSelectedIndex)
                {
                    if (checkIndex(_lastSelectedIndex))
                    {
                        _children[_lastSelectedIndex].transition(input);
                    }
                    _lastSelectedIndex = _currentSelectedIndex;
                }
            }

            if (checkIndex(_lastSelectedIndex))
            {
                isFinish = _children[_lastSelectedIndex].tick(input, output);
                if (isFinish == BRS_FINISH)
                {
                    _lastSelectedIndex = -1;
                }
            }
            return(isFinish);
        }
示例#2
0
        override protected int doTick(BevNodeInputParam input,
                                      BevNodeOutputParam output)
        {
            int isFinish = BRS_FINISH;

            if (checkIndex(0))
            {
                isFinish = _children[0].tick(input, output);
                if (isFinish == BRS_FINISH)
                {
                    if (_loopCount == -1)
                    {
                        isFinish = BRS_EXECUTING;
                    }
                    else
                    {
                        ++_currentLoop;
                        if (_currentLoop < _loopCount)
                        {
                            isFinish = BRS_EXECUTING;
                        }
                    }
                }
            }

            if (isFinish == BRS_FINISH)
            {
                _currentLoop = 0;
            }
            return(isFinish);
        }
示例#3
0
        override protected int doTick(BevNodeInputParam input, 
            BevNodeOutputParam output)
        {
            int isFinish = BRS_FINISH;
            if (checkIndex(0)) {
                isFinish = _children[0].tick(input, output);
                if (isFinish == BRS_FINISH)
                {
                    if (_loopCount == -1)
                        isFinish = BRS_EXECUTING;
                    else {
                        ++_currentLoop;
                        if (_currentLoop < _loopCount)
                            isFinish = BRS_EXECUTING;
                    }
                }
            }

            if (isFinish == BRS_FINISH)
                _currentLoop = 0;
            return isFinish;
        }
        override protected int doTick(BevNodeInputParam input, 
            BevNodeOutputParam output)
        {
            int isFinish = BRS_FINISH;
            if (checkIndex(_currentSelectedIndex))
            {
                if (_currentSelectedIndex != _lastSelectedIndex)
                {
                    if (checkIndex(_lastSelectedIndex))
                    {
                        _children[_lastSelectedIndex].transition(input);
                    }
                    _lastSelectedIndex = _currentSelectedIndex;
                }
            }

            if (checkIndex(_lastSelectedIndex))
            {
                isFinish = _children[_lastSelectedIndex].tick(input, output);
                if (isFinish == BRS_FINISH)
                    _lastSelectedIndex = -1;
            }
            return isFinish;
        }
示例#5
0
 virtual protected int doTick(BevNodeInputParam input, BevNodeOutputParam output)
 {
     return BRS_FINISH;
 }
示例#6
0
 public int tick(BevNodeInputParam input, BevNodeOutputParam output)
 {
     return doTick(input, output);
 }
示例#7
0
 protected virtual EBevRunningState _DoTick(BevNodeInputParam inputParam, BevNodeOutputParam outputParam)
 {
     return(EBevRunningState.Finish);
 }
示例#8
0
 public EBevRunningState Tick(BevNodeInputParam inputParam, BevNodeOutputParam outputParam)
 {
     return(_DoTick(inputParam, outputParam));
 }
示例#9
0
 protected virtual BevRunningStatus DoExcute(ref BevNodeInputParam input, BevNodeOutputParam output)
 {
     throw new NotImplementedException();
 }
示例#10
0
 public int tick(BevNodeInputParam input, BevNodeOutputParam output)
 {
     return(doTick(input, output));
 }
示例#11
0
 virtual protected int doTick(BevNodeInputParam input, BevNodeOutputParam output)
 {
     return(BRS_FINISH);
 }
示例#12
0
 protected virtual EBevRunningState _DoExecute(BevNodeInputParam input, BevNodeOutputParam output)
 {
     return(EBevRunningState.Finish);
 }
示例#13
0
 private BevRunningStatus DoTick(ref BevNodeInputParam input, ref BevNodeOutputParam output)
 {
     throw new NotImplementedException();
 }
示例#14
0
 /// <summary>
 /// 更新方法,类似于Mono的Update()
 /// </summary>
 /// <param name="input"></param>
 /// <param name="output"></param>
 /// <returns></returns>
 BevRunningStatus Tick(ref BevNodeInputParam input, ref BevNodeOutputParam output)
 {
     return(DoTick(ref input, ref output));
 }