Пример #1
0
        protected override void LocalUpdate(AgentContext context)
        {
            bool failed;

            TaskUtil.Process(context, rootTask, out failed);
            state = (failed ? TaskState.Failed : TaskState.Active);
        }
Пример #2
0
    void FixedUpdate()
    {
        bool failed;

        TaskUtil.Process(context, mBrain, out failed);

        if (failed)
        {
            Debug.LogError(name + ": Agent brain failed. Will attempt a re-start.");
        }
        else
        {
            PostFixedUpdate();
        }
    }