public class Dispatcher
extends java.lang.Object
Constructor and Description |
---|
Dispatcher() |
Modifier and Type | Method and Description |
---|---|
void |
deleteAllTelegrams()
Remove all outstanding telegrams - useful if reseting a game or simulation
|
static void |
dispatch(long delay_ms,
int sender,
int receiver,
int msg,
java.lang.Object... eInfo)
Dispatch a telegram to another entity with optional delay and any extra information supplied
|
static void |
update()
Called by the world update - will send any telegrams ready for processing
|
public static void dispatch(long delay_ms, int sender, int receiver, int msg, java.lang.Object... eInfo)
delay_ms
- the delay (in milliseconds) before the telegram is to be sentsender
- the ID of the entity sending the messagereceiver
- the ID of the entity to receive the telegrammsg
- unique integer identifying the messageeInfo
- additional information as required - the receiver will know what there is.public static void update()
public void deleteAllTelegrams()
Processing library AI_for_2D_Games by Peter Lager. (C) 2013