![]() |
Grail (C#)
1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
Defines a basic object which can execute behaviors. More...

Public Member Functions | |
| AIEntity (string name="") | |
| Constructs an AIEntity with the given name. More... | |
| void | AddSharedBlackboard (string key, Blackboard blackboard) |
| Inserts pair of key and blackboard into container of shared blackboards. More... | |
| Blackboard | GetSharedBlackboard (string key) |
| Gets shared blackboard identified by given key. More... | |
| Behavior | MoveSuspendedBehavior () |
| Gets reference to a previously assigned behavior that has been suspended by a new one. More... | |
| void | StageBehavior (Behavior behavior) |
| Finishes the current behavior and starts a new one. More... | |
| void | AddReasonerChangeObserver (IReasonerChangeObserver observer) |
| Adds a reasoner change observer that will be notified via calling OnReasonerSet function when a new reasoner is be assigned to an entity. More... | |
| void | RemoveReasonerChangeObserver (IReasonerChangeObserver observer) |
| Removes a reasoner change observer so it won't be notified of reasoner changes anymore. More... | |
Static Public Member Functions | |
| static void | ResetNextId (int nextId=0) |
| Resets available entity IDs. Useful when the game should be restarted but entities were not destroyed, like ending Play in Editor or soft restarting level. More... | |
Public Attributes | |
| Blackboard | Blackboard => blackboard |
| Blackboard owned by this entity. More... | |
| bool | HasActiveBehavior => currentBehavior != null |
| Checks whether current behavior is not nullptr. More... | |
| Dictionary< string, Blackboard > | SharedBlackboards => sharedBlackboards |
Protected Attributes | |
| readonly Dictionary< string, Blackboard > | sharedBlackboards |
| Reasoner | reasoner |
Properties | |
| string | Name [get] |
| A name used for display and debug purposes. More... | |
| Behavior | CurrentBehavior [get] |
| get - Behavior currently assigned to this entity. More... | |
| bool | HasStagedBehavior [get] |
| Checks whether this entity has a behavior awaiting its execution. More... | |
| int | Id [get] |
| A unique integer id assigned by AIManager during construction. More... | |
| Reasoner | Reasoner = nextEntityId++ [get, set] |
| Reasoner assigned to this entity. More... | |
Defines a basic object which can execute behaviors.
|
inline |
Constructs an AIEntity with the given name.
| name |
|
inline |
Adds a reasoner change observer that will be notified via calling OnReasonerSet function when a new reasoner is be assigned to an entity.
| observer |
|
inline |
Inserts pair of key and blackboard into container of shared blackboards.
| key | |
| blackboard |
|
inline |
Gets shared blackboard identified by given key.
| key |
|
inline |
Gets reference to a previously assigned behavior that has been suspended by a new one.
|
inline |
Removes a reasoner change observer so it won't be notified of reasoner changes anymore.
| observer |
|
inlinestatic |
Resets available entity IDs. Useful when the game should be restarted but entities were not destroyed, like ending Play in Editor or soft restarting level.
| nextId | Optional next available entity id |
|
inline |
Finishes the current behavior and starts a new one.
| behavior |
| Blackboard Grail.Core.AIEntity.Blackboard => blackboard |
Blackboard owned by this entity.
| bool Grail.Core.AIEntity.HasActiveBehavior => currentBehavior != null |
Checks whether current behavior is not nullptr.
|
get |
Checks whether this entity has a behavior awaiting its execution.
|
get |
A unique integer id assigned by AIManager during construction.
|
get |
A name used for display and debug purposes.