Example #1
0
        public override BehaviourReturnCode Behave()
        {
            try
            {
                if (_interruptCondition.Behave() == BehaviourReturnCode.Success)
                {
                    ReturnCode = _onInterruptReturn;
                    return(_onInterruptReturn);
                }

                ReturnCode = _behaviourComponent.Behave();
                return(ReturnCode);
            }
            catch (Exception e)
            {
#if DEBUG
                Console.Error.WriteLine(e.ToString());
#endif
                ReturnCode = BehaviourReturnCode.Failure;
                return(ReturnCode);
            }
        }