Example #1
0
    protected override NodeState OnRunning(ExecutionContext context)
    {
        var sc = (SimpleContext)_context;

        target = sc.Actor.GetComponent <agentStateController>().searchTarget;
        Debug.Log("Search for " + target.ToString()); //здесь 3
        _tree.Execute(context);

        //SimpleContext sc = (SimpleContext)context;

        return(NodeState.Success);
    }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     _tree.Execute(_context);
 }