An LDTK level.
More...
#include <World.hpp>
|
| | World () |
| | Constructor.
|
| |
| | World (const std::string &file) |
| | Argument Constructor.
|
| |
| | ~World () |
| | Destructor.
|
| |
| bool | load (const std::string &file) |
| | Load a world.
|
| |
| void | parse () |
| | Parse world and create entities.
|
| |
| void | clear () |
| | Clear all map and world data.
|
| |
| void | set_active (const std::string &map) |
| | Set currently active map.
|
| |
| map::Map * | get_active () const |
| | Get currently active map.
|
| |
| const std::string & | name () const |
| | Get world name.
|
| |
| const std::string & | file () const |
| | Get file.
|
| |
| bool | loaded () const |
| | Check if load() was called.
|
| |
| ankerl::unordered_dense::map< std::string, map::Map > & | maps () |
| | Get maps.
|
| |
An LDTK level.
Definition at line 23 of file World.hpp.
◆ World() [1/2]
| galaxy::map::World::World |
( |
| ) |
|
◆ World() [2/2]
| galaxy::map::World::World |
( |
const std::string & | file | ) |
|
Argument Constructor.
- Parameters
-
Definition at line 23 of file World.cpp.
◆ ~World()
| galaxy::map::World::~World |
( |
| ) |
|
◆ load()
| bool galaxy::map::World::load |
( |
const std::string & | file | ) |
|
|
nodiscard |
Load a world.
- Parameters
-
Definition at line 37 of file World.cpp.
◆ parse()
| void galaxy::map::World::parse |
( |
| ) |
|
Parse world and create entities.
Definition at line 63 of file World.cpp.
◆ clear()
| void galaxy::map::World::clear |
( |
| ) |
|
Clear all map and world data.
Definition at line 77 of file World.cpp.
◆ set_active()
| void galaxy::map::World::set_active |
( |
const std::string & | map | ) |
|
Set currently active map.
- Parameters
-
Definition at line 85 of file World.cpp.
◆ get_active()
| map::Map * galaxy::map::World::get_active |
( |
| ) |
const |
|
nodiscard |
Get currently active map.
- Returns
- Pointer to active map.
Definition at line 97 of file World.cpp.
◆ name()
| const std::string & galaxy::map::World::name |
( |
| ) |
const |
|
nodiscard |
Get world name.
- Returns
- Const string reference.
Definition at line 102 of file World.cpp.
◆ file()
| const std::string & galaxy::map::World::file |
( |
| ) |
const |
|
nodiscard |
Get file.
- Returns
- Const string reference.
Definition at line 107 of file World.cpp.
◆ loaded()
| bool galaxy::map::World::loaded |
( |
| ) |
const |
|
nodiscard |
Check if load() was called.
- Returns
- True if loaded.
Definition at line 112 of file World.cpp.
◆ maps()
| ankerl::unordered_dense::map< std::string, map::Map > & galaxy::map::World::maps |
( |
| ) |
|
|
nodiscard |
◆ m_file
| std::string galaxy::map::World::m_file |
|
private |
◆ m_project
| ldtk::Project galaxy::map::World::m_project |
|
private |
LDTK project data.
Definition at line 117 of file World.hpp.
◆ m_maps
| ankerl::unordered_dense::map<std::string, map::Map> galaxy::map::World::m_maps |
|
private |
List of ldtk levels.
Definition at line 122 of file World.hpp.
◆ m_current
◆ m_loaded
| bool galaxy::map::World::m_loaded |
|
private |
The documentation for this class was generated from the following files: