#include <CSWEvent.h>
Inherited by CSWPyEvent.
Public Member Functions | |
std::shared_ptr< CSWIMessage > | getMessage () |
Static Public Member Functions | |
static PtrType | create (std::shared_ptr< CSWObject > pSender, std::shared_ptr< CSWObject > pReceiver, std::shared_ptr< CSWIMessage > pMessage, double fExpireTime) |
This class encapsulates an event. An event will delivered from sender to an receiver. It contains a message and a time to life.
|
static |
Creates a new Event.
pSender | The sender (should always be self, because you never know other submarines) |
pReceiver | The receiver (should always be self, because you never know other submarines) |
pMessage | The message that should be delivered. |
fExpireTime | The time to life in seconds. This is clamped to range [0, 20]. |
CSWIMessage::PtrType CodeSubWars::CSWEvent::getMessage | ( | ) |
Returns the containing message.