The GraphOwner class has the following important methods and properties:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
//The Graph currently assigned Graph graph {get;set;} //The Blackboard currently assigned Blackboard blackboard {get;set;} //Is the Graph running? bool isRunning {get;} //Is the Graph paused? bool isPaused {get;} //Starts the behaviour void StartBehaviour() //Starts the behaviour and get a callback when and if it's finished void StartBehaviour(System.Action callback) //Start a new behaviour graph void StartBehaviour(Graph newGraph) //Both of the above void StartBehaviour(Graph newGraph, System.Action callback) //Stops the behaviour void StopBehaviour() //Pause the behaviour void PauseBehaviour() //Sends an event void SendEvent(string eventName) //Sends an value event void SendEvent<T>(string eventName, T value) //Send a global event. Same as Graph.SendGlobalEvent static void SendGlobalEvent(string eventName) //Send a global value event. Same as Graph.SendGlobalEvent static void SendGlobalEvent<T>(string eventName, T value) //Calls a public method of name "methodName" on all tasks of the assigned graph void SendTaskMessage(string methodName, object value = null) |
The BehaviourTreeOwner has the following on top of the inherited GrapOwner ones:
1 2 3 4 5 6 7 8 9 10 11 12 |
//Should the BehaviourTree repeat? bool repeat {get;set} //The update interval in seconds the tree is ticked float updateInterval {get;set;} //The current root Status of the behaviour Status rootStatus {get;} //Ticks the current behaviour and returns it's root node status Status Tick() |
The FSMOwner has the following on top of the inherited GraphOwner ones:
1 2 3 4 5 6 7 8 9 10 11 |
//The current State's name string currentStateName {get;} //The previous State's name string previousStateName {get;} //Triggers a state of the current FSM by name. Returns the FSMState node triggered. FSMState TriggerState(string) //Return the names of all states of the current FSM assigned to the FSMOwner string[] GetStateNames() |