|
Potato Engine
|
Level object that stores persistent save data. More...
#include <PersistentLevel.hpp>
Public Member Functions | |
| PersistentLevel (const std::string &saveFileName) | |
| Construct level object. | |
| bool | LoadStaticActors () |
| Loads all static actors into the world. | |
| template<typename Type> | |
| Type | GetData (std::string key) const |
| Get save data from a key. | |
| template<typename Type> | |
| void | WriteData (std::string key, Type value) |
| Write save data to a key. | |
Level object that stores persistent save data.
This object serves as a wrapper around a save state file and manages read/write operations, as well as persistent game object loading. Note that the level manages all save data, not only world data.
Definition at line 15 of file PersistentLevel.hpp.
| PersistentLevel::PersistentLevel | ( | const std::string & | saveFileName | ) |
Construct level object.
| saveFileName | Name of save file (under saves/) |
Definition at line 17 of file PersistentLevel.cpp.
| bool PersistentLevel::LoadStaticActors | ( | ) |
Loads all static actors into the world.
Definition at line 23 of file PersistentLevel.cpp.
| Type PersistentLevel::GetData | ( | std::string | key | ) | const |
Get save data from a key.
| Type | Type of data to get |
| key | Key to get data from |
Definition at line 66 of file PersistentLevel.hpp.
| void PersistentLevel::WriteData | ( | std::string | key, |
| Type | value ) |
Write save data to a key.
| Type | Type of data to write |
| key | Key to write data to |
| value | Data |
Definition at line 82 of file PersistentLevel.hpp.