File stateService.hpp

Typedefs

using Value = std::variant<sol::lua_nil_t, bool, double, std::string, sol::table, sol::function>

The StateService is responsible for storing gameplay-related variables that make up the state of the game.

class StateService
#include <stateService.hpp>

Public Functions

StateService()

Empty constructor

void setProp(const std::string &prop, Value value)

Set a property

Value getProp(const std::string &prop) const

Get a boolean property from the container.

void unload() const

Unload routine.

Private Members

std::map<std::string, Value> gameState

A pair of string keys and boolean values.