![]() |
Blamite Game Engine - blam!
00357.06.18.22.0809.blamite
The core library for the Blamite Game Engine.
|
Class representing a world state. More...
#include <world.h>
Public Member Functions | |
BlamWorldState () | |
Initializes a new world state. More... | |
~BlamWorldState () | |
Destroys the world state. More... | |
void | AddObject (BlamWorldObject *object) |
void | RemoveObject (uint64_t object_id) |
int | GetObjectCount () |
bool | HasObject (uint64_t object_id) |
BlamWorldObject * | GetObjectAtIndex (int index) |
BlamWorldObject * | GetObjectById (uint64_t object_id) |
bool | Drop (BlamTagData *tag_data, BlamVector3 position) |
Drops a tag into the world at the specified coordinates. More... | |
void | OnTickEvent (TickEvent *event) |
Called when the listener is subscribed to Key Press events, and a new TickEvent is fired. More... | |
![]() | |
void | Subscribe (BlamEventType type) |
Subscribes to an event type. More... | |
~BlamEventListener () | |
std::vector< BlamEventType > | GetSubscribedEvents () |
Retrieves the list of subscribed event types. More... | |
bool | IsSubscribed (BlamEventType type) |
Determines whether or not the listener is subscribed to the specified event type. More... | |
void | SetPriority (int new_priority) |
Sets the priority of the listener. More... | |
int | GetPriority () |
Retrieves the priority of the listener. More... | |
virtual void | OnCharacterInputEvent (CharacterInputEvent *event) |
Called when the listener is subscribed to Character Input events, and a new CharacterInputEvent is fired. More... | |
virtual void | OnConfigurationReloadEvent (ConfigurationReloadEvent *event) |
Called when the listener is subscribed to configuration reload events, and a new ConfigurationReloadEvent is fired. More... | |
virtual void | OnKeyPressEvent (KeyPressEvent *event) |
Called when the listener is subscribed to Key Press events, and a new KeyPressEvent is fired. More... | |
virtual void | OnMouseClickEvent (MouseClickEvent *event) |
Called when the listener is subscribed to Mouse Click events, and a new MouseClickEvent is fired. More... | |
virtual void | OnMouseMoveEvent (MouseMoveEvent *event) |
Called when the listener is subscribed to Mouse Move events, and a new MouseMoveEvent is fired. More... | |
virtual void | OnNewFrameEvent (NewFrameEvent *event) |
Called when the listener is subscribed to New Frame events, and a new NewFrameEvent is fired. More... | |
virtual void | OnLogMessageEvent (LogMessageEvent *event) |
Called when the listener is subscribed to Log Message events, and a new LogMessageEvent is fired. More... | |
Additional Inherited Members | |
![]() | |
std::string | name = "" |
The name of the listener. Used for debugging purposes. More... | |
Class representing a world state.
The world state stores all data related to the current state of the world in-engine. Primarily, this will include a list of all world objects currently placed down.
BlamWorldState::BlamWorldState | ( | ) |
Initializes a new world state.
BlamWorldState::~BlamWorldState | ( | ) |
Destroys the world state.
void BlamWorldState::AddObject | ( | BlamWorldObject * | object | ) |
bool BlamWorldState::Drop | ( | BlamTagData * | tag_data, |
BlamVector3 | position | ||
) |
Drops a tag into the world at the specified coordinates.
This method will create a new world object from the specified tag.
tag_data | - The tag data to use to create the new world object. |
position | - The position to place the new object at. |
true
if the tag was successfully dropped into the world, otherwise returns false
. BlamWorldObject * BlamWorldState::GetObjectAtIndex | ( | int | index | ) |
BlamWorldObject * BlamWorldState::GetObjectById | ( | uint64_t | object_id | ) |
int BlamWorldState::GetObjectCount | ( | ) |
bool BlamWorldState::HasObject | ( | uint64_t | object_id | ) |
|
virtual |
Called when the listener is subscribed to Key Press events, and a new TickEvent is fired.
event | - The event that was fired. |
Reimplemented from BlamEventListener.
void BlamWorldState::RemoveObject | ( | uint64_t | object_id | ) |