#include <AIController.h>
Public Member Functions | |
void | sendMessage (AIMessage *message, float delay=0) |
AIAgent * | findAgent (const char *id) const |
Defines and facilitates the state machine execution and message passing between AI objects in the game. This class is generally not interfaced with directly.
AIAgent* gameplay::AIController::findAgent | ( | const char * | id | ) | const |
Searches for an AIAgent that is registered with the AIController with the specified ID.
id | ID of the agent to find. |
void gameplay::AIController::sendMessage | ( | AIMessage * | message, |
float | delay = 0 |
||
) |
Routes the specified message to its intended recipient(s).
Messages are arbitrary packets of data that are sent either to a single or to multiple recipients in the game.
Once the specified message has been delivered, it is automatically destroyed by the AIController. For this reason, AIMessage pointers should NOT be held or explicitly destroyed by any code after they are sent through the AIController.
message | The message to send. |
delay | The delay (in milliseconds) to wait before sending the message. |