Exemplo n.º 1
0
 /// <summary>Inits the blackboard for the current graph.</summary>
 protected void InitBlackboard()
 {
     // Set up blackboard.
     _blackboard = ScriptableObject.CreateInstance(typeof(AIBlackboard)) as AIBlackboard;
     SetInBlackboard("GameObject", gameObject);
     // Init tree.
     _graph.Init(_blackboard);
     // Execute on tree init event.
     if (OnGraphInit != null)
     {
         OnGraphInit();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Run the AIGraph in the given blackboard.
 /// </summary>
 /// <param name="blackboard"> The blackboard use to execute the graph.</param>
 public abstract AIGraphResult Run(AIBlackboard blackboard);
Exemplo n.º 3
0
 /// <summary>
 /// Initialize the AIGraph in the given blackboard.
 /// </summary>
 /// <param name="blackboard"> The blackboard use to initialize the graph.</param>
 public abstract void Init(AIBlackboard blackboard);