GigaPasjans
Loading...
Searching...
No Matches
Phosphorus::GameObjectRegistry Class Reference

Storage of GameObjects (scene). GameObjectRegistry take over ownership of object. More...

#include <GameObject.h>

Inheritance diagram for Phosphorus::GameObjectRegistry:

Public Member Functions

GameObjectGetGameObject (const String &identifier)
 Find GameObject with given name.
 
void Clear ()
 Deletes all GameObject from registry.
 
GameObjectGetGameObjectByUniqueId (const String &identifier)
 Find GameObject with unique id.
 
void RegisterGameObject (const String &name, GameObject *object)
 Registers given GameObject.
 

Protected Member Functions

std::unordered_map< String, GameObject * > & getMap ()
 
const std::unordered_map< String, GameObject * > & getMap () const
 

Protected Attributes

std::unordered_map< String, GameObject * > m_GameObjects
 

Friends

class GameSerializer
 

Detailed Description

Storage of GameObjects (scene). GameObjectRegistry take over ownership of object.

Member Function Documentation

◆ GetGameObject()

GameObject * Phosphorus::GameObjectRegistry::GetGameObject ( const String & identifier)
inline

Find GameObject with given name.

Parameters
identifierIdentifier.
Returns
GameObject* Found GameObject.

◆ GetGameObjectByUniqueId()

GameObject * Phosphorus::GameObjectRegistry::GetGameObjectByUniqueId ( const String & identifier)
inline

Find GameObject with unique id.

Parameters
identifierUnique id.
Returns
GameObject* Found GameObject.

The documentation for this class was generated from the following file: