Rubeus::RLevel class

A single container from all access to a level's contents.

Public static variables

static std::unordered_map<std::string, RLevel*> InstantiatedLevels
Pointers to all objects instantiated of this class.

Constructors, destructors, conversion operators

RLevel(std::string name)
Constructor.
~RLevel() virtual
Destructor.

Public functions

void begin() virtual
User overridable on startup script for this level.
void onEnd() virtual
User overridable script called on end of this level.
void addGameObject(RGameObject* gameObject)
Add a gameobject to this level's world.
auto getName() const -> std::string
Get the name of this level.
auto getWorld() const -> RWorld*
Get the world of this level.
auto getInputManager() const -> RInputManager*
Get the input manager of this level.
auto getSoundManager() const -> AudioComponents::RSymphony*
Get the audio manager of this level.

Protected variables

RWorld* m_World
The world of this level.
RInputManager* m_InputManager
Input manager of this level. All keybindings are level specific.
AudioComponents::RSymphony* m_AudioManager
Audio manager of this level. All tracks are level specific.
std::string m_Name
Name of this level. Used to identify game objects to their levels.

Function documentation

Rubeus::RLevel::RLevel(std::string name)

Constructor.

Parameters
name The name of this level.

void Rubeus::RLevel::addGameObject(RGameObject* gameObject)

Add a gameobject to this level's world.

Parameters
gameObject The object pointer to be passed in.

std::string Rubeus::RLevel::getName() const

Get the name of this level.

Returns String containing the level name.

RWorld* Rubeus::RLevel::getWorld() const

Get the world of this level.

Returns Pointer to the world of this level.

RInputManager* Rubeus::RLevel::getInputManager() const

Get the input manager of this level.

Returns Pointer to the input manager of this level.

AudioComponents::RSymphony* Rubeus::RLevel::getSoundManager() const

Get the audio manager of this level.

Returns Pointer to the audio manager of this level.