Exemple #1
0
        ///Ticks the assigned Behaviour Tree for this owner agent and returns it's root status
        public Status Tick()
        {
            if (BT == null)
            {
                Debug.LogWarning("There is no Behaviour Tree assigned", gameObject);
                return(Status.Resting);
            }

            return(BT.Tick(this, blackboard));
        }
Exemple #2
0
        /////////

        protected override Status OnExecute(Component agent, IBlackboard blackboard)
        {
            if (subTree == null || subTree.primeNode == null)
            {
                return(Status.Failure);
            }

            if (status == Status.Resting)
            {
                currentInstance = CheckInstance();
            }

            return(currentInstance.Tick(agent, blackboard));
        }