Scene saving/loading, pushing, popping, creating, Entity management.
More...
#include <World.hpp>
|
| World () noexcept |
| Constructor.
|
|
| ~World () noexcept |
| Destructor.
|
|
std::shared_ptr< Scene > | add (const std::string &name) |
| Add a new scene.
|
|
std::shared_ptr< Scene > | get (const std::string &name) noexcept |
| Get a specific scene.
|
|
void | remove (const std::string &name) |
| Remove a specific scene.
|
|
bool | has (const std::string &name) noexcept |
| Does a scene exist.
|
|
void | push (const std::string &name) noexcept |
| Push a scene onto the top of stack.
|
|
void | pop () noexcept |
| Remove scene on top of stack.
|
|
void | pop_all () noexcept |
| Remove all scenes in stack.
|
|
std::shared_ptr< Scene > | top () const noexcept |
| Get top scene in stack.
|
|
void | update () |
| Process events and updates.
|
|
void | render () |
| Render scenes.
|
|
void | clear () |
| Removes all data.
|
|
SceneMap & | get_scenes () noexcept |
| Get Scene storage.
|
|
SceneStack & | get_scene_stack () noexcept |
| Get Scene stack.
|
|
Scene saving/loading, pushing, popping, creating, Entity management.
Definition at line 21 of file World.hpp.
◆ SceneMap
◆ SceneStack
◆ World()
◆ ~World()
galaxy::World::~World |
( |
| ) |
|
|
noexcept |
◆ add()
std::shared_ptr< Scene > galaxy::World::add |
( |
const std::string & | name | ) |
|
Add a new scene.
- Parameters
-
- Returns
- Shared pointer to added scene.
Definition at line 25 of file World.cpp.
◆ get()
std::shared_ptr< Scene > galaxy::World::get |
( |
const std::string & | name | ) |
|
|
nodiscardnoexcept |
Get a specific scene.
- Parameters
-
- Returns
- Shared pointer to scene.
Definition at line 41 of file World.cpp.
◆ remove()
void galaxy::World::remove |
( |
const std::string & | name | ) |
|
Remove a specific scene.
- Parameters
-
Definition at line 56 of file World.cpp.
◆ has()
bool galaxy::World::has |
( |
const std::string & | name | ) |
|
|
nodiscardnoexcept |
Does a scene exist.
- Parameters
-
- Returns
- True if exists.
Definition at line 62 of file World.cpp.
◆ push()
void galaxy::World::push |
( |
const std::string & | name | ) |
|
|
noexcept |
Push a scene onto the top of stack.
- Parameters
-
Definition at line 68 of file World.cpp.
◆ pop()
void galaxy::World::pop |
( |
| ) |
|
|
noexcept |
Remove scene on top of stack.
Definition at line 81 of file World.cpp.
◆ pop_all()
void galaxy::World::pop_all |
( |
| ) |
|
|
noexcept |
Remove all scenes in stack.
Definition at line 90 of file World.cpp.
◆ top()
std::shared_ptr< Scene > galaxy::World::top |
( |
| ) |
const |
|
nodiscardnoexcept |
Get top scene in stack.
- Returns
- Shared pointer to top scene.
Definition at line 98 of file World.cpp.
◆ update()
void galaxy::World::update |
( |
| ) |
|
Process events and updates.
Definition at line 108 of file World.cpp.
◆ render()
void galaxy::World::render |
( |
| ) |
|
◆ clear()
void galaxy::World::clear |
( |
| ) |
|
◆ get_scenes()
◆ get_scene_stack()
◆ m_registry
◆ m_scenes
◆ m_scene_stack
The documentation for this class was generated from the following files: