Rebornbuddy
|
A simplistic class to facilitate hooking into logic trees. More...
Public Member Functions | |
void | AddHook (string location, Composite behavior) |
Inserts a hook at the specified location. This appends the behavior to the end of the list. | |
void | InsertHook (string location, int index, Composite behavior) |
Inserts a hook at the specified location. This inserts the behavior to the specified index in the hook list. | |
void | RemoveHook (string location, Composite behavior) |
Removes a hook at the specified location. | |
void | ClearHook (string location) |
Removes all hooks at the specified location. | |
void | ReplaceHook (string location, Composite behavior) |
Replaces all hooks at the specified location, with one that you provide. | |
void | ClearAll () |
Clears all registered hooks in the TreeHooks system. |
Properties | |
static TreeHooks | Instance [get] |
Gets the singleton instance of the TreeHooks class. | |
List< HookDescription > | HookDescriptions [get] |
Gets or sets the list of hook descriptions associated with the logic trees. | |
Dictionary< string, List< Composite > > | Hooks [get] |
Gets the collection of hooks associated with the logic trees. |
Events | |
EventHandler | OnHooksCleared |
Event queue for all listeners interested in OnHooksCleared events. |
A simplistic class to facilitate hooking into logic trees.
Created 3/22/2011.
void ff14bot.Behavior.TreeHooks.AddHook | ( | string | location, |
Composite | behavior ) |
Inserts a hook at the specified location. This appends the behavior to the end of the list.
Created 3/9/2011.
location | The location. |
behavior | The behavior. |
void ff14bot.Behavior.TreeHooks.ClearAll | ( | ) |
Clears all registered hooks in the TreeHooks system.
This method removes all existing hooks, clears the hook cache, and triggers the OnHooksCleared event. It is typically used to reset and reinitialize the hook system.
void ff14bot.Behavior.TreeHooks.ClearHook | ( | string | location | ) |
Removes all hooks at the specified location.
location | The location. |
void ff14bot.Behavior.TreeHooks.InsertHook | ( | string | location, |
int | index, | ||
Composite | behavior ) |
Inserts a hook at the specified location. This inserts the behavior to the specified index in the hook list.
Created 3/9/2011.
location | The location. |
index | |
behavior | The behavior. |
void ff14bot.Behavior.TreeHooks.RemoveHook | ( | string | location, |
Composite | behavior ) |
Removes a hook at the specified location.
Created 1/28/2012.
location | The location. |
behavior | The behavior. |
void ff14bot.Behavior.TreeHooks.ReplaceHook | ( | string | location, |
Composite | behavior ) |
Replaces all hooks at the specified location, with one that you provide.
Created 3/9/2011.
location | The location. |
behavior | The behavior. |
|
get |
Gets or sets the list of hook descriptions associated with the logic trees.
Used to provide metadata about hooks, including their names and descriptions.
|
get |
Gets the collection of hooks associated with the logic trees.
|
staticget |
EventHandler ff14bot.Behavior.TreeHooks.OnHooksCleared |
Event queue for all listeners interested in OnHooksCleared events.