Thrive
Classes | Public Member Functions | Static Public Member Functions | List of all members
thrive::PlayerData Class Reference

Classes

struct  Implementation
 

Public Member Functions

 PlayerData (std::string name)
 constructor More...
 
 ~PlayerData ()
 destructor
 
const std::string & playerName ()
 Getter for the players name. More...
 
LockedMap & lockedMap ()
 Getter for the map of locked concepts. More...
 
EntityId activeCreature ()
 Getter for the id of the players currently active creature entity. More...
 
void setActiveCreature (EntityId creatureId, GameState &gamestate)
 setter for the players active creature More...
 
GameState & activeCreatureGamestate ()
 Getter for the players currently active creatures gamestate. More...
 
bool isBoolSet (std::string key) const
 Returns whether a key has a true bool set to it. More...
 
void setBool (std::string key, bool value)
 Binds a string to a bool. More...
 
void load (const StorageContainer &storage)
 Called by the engine during loading of a savegame. More...
 
StorageContainer storage () const
 Called by the engine during savegame creation. More...
 

Static Public Member Functions

static luabind::scope luaBindings ()
 Lua bindings. More...
 

Constructor & Destructor Documentation

PlayerData::PlayerData ( std::string  name)

constructor

Parameters
nameThe name of the player

Member Function Documentation

EntityId PlayerData::activeCreature ( )

Getter for the id of the players currently active creature entity.

Returns
GameState & PlayerData::activeCreatureGamestate ( )

Getter for the players currently active creatures gamestate.

Returns
bool PlayerData::isBoolSet ( std::string  key) const

Returns whether a key has a true bool set to it.

Returns
void PlayerData::load ( const StorageContainer &  storage)

Called by the engine during loading of a savegame.

Parameters
storage
See also
PlayerData::storage()
LockedMap & PlayerData::lockedMap ( )

Getter for the map of locked concepts.

Returns
luabind::scope PlayerData::luaBindings ( )
static
const std::string & PlayerData::playerName ( )

Getter for the players name.

Returns
void PlayerData::setActiveCreature ( EntityId  creatureId,
GameState &  gamestate 
)

setter for the players active creature

Parameters
creatureIdEntity id of the creature
gamestateThe gamestate that the players new active creature belongs to
void PlayerData::setBool ( std::string  key,
bool  value 
)

Binds a string to a bool.

Parameters
keyThe string key to bind
valueWhat value to bind the key to
StorageContainer PlayerData::storage ( ) const

Called by the engine during savegame creation.

Returns
See also
PlayerData::load()

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