FluentBehaviourTree.InverterNode.Tick C# (CSharp) Method

Tick() public method

public Tick ( TimeData time ) : BehaviourTreeStatus
time TimeData
return BehaviourTreeStatus
        public BehaviourTreeStatus Tick(TimeData time)
        {
            if (childNode == null)
            {
                throw new ApplicationException("InverterNode must have a child node!");
            }

            var result = childNode.Tick(time);
            if (result == BehaviourTreeStatus.Failure)
            {
                return BehaviourTreeStatus.Success;
            }
            else if (result == BehaviourTreeStatus.Success)
            {
                return BehaviourTreeStatus.Failure;
            }
            else
            {
                return result;
            }
        }