示例#1
0
        void OnEnter()
        {
            if (nestedFC == null)
            {
                return;
            }

            currentInstance = CheckInstance();
            currentInstance.StartGraph(graph.agent, graphBlackboard, true, OnFinish);
            //RegisterUpdate();
        }
        protected override void OnEnter()
        {
            if (flowScript == null)
            {
                Finish(false);
                return;
            }

            currentInstance = CheckInstance();
            currentInstance.StartGraph(graphAgent, graphBlackboard, false, OnFlowScriptFinished);
        }
示例#3
0
 void OnUnPause()
 {
     if (currentInstance != null && currentInstance.isPaused)
     {
         if (nestedFC == null)
         {
             return;
         }
         currentInstance.StartGraph(graph.agent, graphBlackboard, true);
         //RegisterUpdate();
     }
 }
示例#4
0
        protected override Status OnExecute(Component agent, IBlackboard bb)
        {
            if (flowScript == null)
            {
                return(Error("FlowScript is null"));
            }

            currentInstance = CheckInstance();
            status          = Status.Running;
            currentInstance.StartGraph(finalActor.transform, graphBlackboard, false, OnFlowScriptFinish);
            StartCoroutine(UpdateGraph());
            return(status);
        }
        protected override Status OnExecute(Component agent, IBlackboard blackboard)
        {
            if (flowScript == null)
            {
                return(Status.Failure);
            }

            if (status == Status.Resting)
            {
                currentInstance = CheckInstance();
                status          = Status.Running;
                currentInstance.StartGraph(agent, blackboard, false, OnFlowScriptFinished);
            }

            if (status == Status.Running)
            {
                currentInstance.UpdateGraph();
            }

            return(status);
        }