grail (C
1.0.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Manages registered entities and shared blackboards. More...
Public Member Functions | |
AIManager (int threadNumber=0) | |
Constructs manager and spawns worker threads defined by parameter. If threadsNumber equals 0, all calculations will be done on main thread. More... | |
void | Dispose () |
void | RegisterAIEntity (AIEntity entity, int priority) |
Manager registers entity with given priority. More... | |
void | RegisterAIEntity (AIEntity entity, AIEntity parent, int priorityOffset) |
Managers registers entity with priority worse by priorityOffset than in case of parent entity. More... | |
void | RegisterEntityGroup (EntityGroup entityGroup, int priority) |
void | RemoveEntityGroup (EntityGroup entityGroup) |
void | RemoveAIEntity (AIEntity entity) |
Manager caches given entity. Later on all cached entities will be unregistered from this manager. More... | |
Blackboard | CreateBlackboard (string blackboardName) |
Constructs blackboard owned by this manager. More... | |
void | SubscribeToBlackboard (string blackboardName, AIEntity entity) |
Subscribed given entity to blackboard identified by blackboard name and owned by this manager More... | |
void | UpdateEntities (float deltaTime) |
Updates entities and their assigned behaviors. More... | |
void | UpdateReasoners () |
Lets registered entities think by updating their reasoners. More... | |
void | RegisterEntityChangeObserver (IEntityChangeObserver observer) |
void | RemoveEntityChangeObserver (IEntityChangeObserver observer) |
bool | ContainsEntity (AIEntity entity) |
Properties | |
List<(AIEntity entity, int priority)> | Entities [get] |
List< EntityGroup > | EntityGroups = new List<EntityGroup>() [get] |
Dictionary< string, Blackboard > | SharedBlackboards [get] |
Manages registered entities and shared blackboards.
|
inline |
Constructs manager and spawns worker threads defined by parameter. If threadsNumber equals 0, all calculations will be done on main thread.
threadNumber |
|
inline |
Constructs blackboard owned by this manager.
blackboardName |
|
inline |
Managers registers entity with priority worse by priorityOffset than in case of parent entity.
entity | |
parent | |
priorityOffset |
|
inline |
Manager registers entity with given priority.
entity | |
priority |
|
inline |
Manager caches given entity. Later on all cached entities will be unregistered from this manager.
entity |
|
inline |
Subscribed given entity to blackboard identified by blackboard name and owned by this manager
blackboardName | |
entity |
|
inline |
Updates entities and their assigned behaviors.
deltaTime |
|
inline |
Lets registered entities think by updating their reasoners.