supertux
Public Member Functions | Public Attributes | List of all members
PlayerStatus Class Referencefinal

This class keeps player status between different game sessions (for example when switching maps in the worldmap) More...

#include <player_status.hpp>

Public Member Functions

 PlayerStatus (int num_players)
 
void reset (int num_players)
 
void add_coins (int count, bool play_sound=true)
 
void take_checkpoint_coins ()
 
void write (Writer &writer)
 
void read (const ReaderMapping &mapping)
 
int get_max_coins () const
 
bool can_reach_checkpoint () const
 
bool respawns_at_checkpoint () const
 
std::string get_bonus_prefix (int player_id) const
 
bool has_hat_sprite (int player_id) const
 Returns the prefix of the animations that should be displayed.
 
void add_player ()
 
void remove_player (int player_id)
 

Public Attributes

int m_num_players
 
int coins
 
std::vector< BonusType > bonus
 
std::vector< int > max_fire_bullets
 maximum number of fire bullets in play
 
std::vector< int > max_ice_bullets
 maximum number of ice bullets in play
 
std::vector< int > max_air_time
 determines maximum number of seconds player can float in air
 
std::vector< int > max_earth_time
 determines maximum number of seconds player can turn to stone
 
std::string worldmap_sprite
 the sprite of Tux that should be used in worldmap
 
std::string last_worldmap
 the last played worldmap
 
std::string title_level
 level to be used for the title screen, overrides the value of the same property for the world
 

Detailed Description

This class keeps player status between different game sessions (for example when switching maps in the worldmap)


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