Tinman  1.0
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Race Class Reference

#include <race.h>

Collaboration diagram for Race:
Collaboration graph
[legend]

Public Types

typedef std::shared_ptr< Raceshared
 

Public Member Functions

 Race (std::string data_file)
 
virtual ~Race ()
 
void update (float delta)
 
void realize (std::shared_ptr< Game > game, std::vector< Player::shared > players)
 
void add_collision_hooks ()
 
void config_race ()
 
void start ()
 
void pause ()
 
void reset ()
 
void next (std::string data_file)
 
void add (std::vector< Player::shared > players)
 
bool has_ended ()
 
Section get_section (int index)
 

Public Attributes

std::vector< btVector3 > starting_grid_
 
Timer timer_
 

Private Member Functions

void create_powerups (void)
 
void configure_grid ()
 
void update_players (float delta)
 
bool end (std::vector< Car::shared > cars)
 
Player::shared get_player (std::string nick)
 
void config_cars_in_login_order ()
 
void reset_powerups ()
 
void reset_cars ()
 
void add_stairs ()
 
std::vector< std::pair< std::string, int > > get_players_positions ()
 
void add_collision_with_circuit (Car::shared car)
 
void add_collision_with_cars (Player::shared target)
 

Private Attributes

std::shared_ptr< Gamegame_
 
int number_of_laps_
 
PowerUp::shared nitro_
 
PowerUp::shared money_
 
std::vector< Player::sharedplayers_
 
Track::shared circuit_
 
std::vector< std::string > player_nicks_
 

Member Typedef Documentation

typedef std::shared_ptr<Race> Race::shared

Constructor & Destructor Documentation

Race::Race ( std::string  data_file)
Race::~Race ( )
virtual

Member Function Documentation

void Race::add ( std::vector< Player::shared players)
void Race::add_collision_hooks ( )
void Race::add_collision_with_cars ( Player::shared  target)
private
void Race::add_collision_with_circuit ( Car::shared  car)
private
void Race::add_stairs ( )
private
void Race::config_cars_in_login_order ( )
private
void Race::config_race ( )
void Race::configure_grid ( )
private
void Race::create_powerups ( void  )
private
bool Race::end ( std::vector< Car::shared cars)
private
Player::shared Race::get_player ( std::string  nick)
private
std::vector< std::pair< std::string, int > > Race::get_players_positions ( )
private
Section Race::get_section ( int  index)
bool Race::has_ended ( )
void Race::next ( std::string  data_file)
void Race::pause ( )
void Race::realize ( std::shared_ptr< Game game,
std::vector< Player::shared players 
)
void Race::reset ( )
void Race::reset_cars ( )
private
void Race::reset_powerups ( )
private
void Race::start ( )
void Race::update ( float  delta)
void Race::update_players ( float  delta)
private

Member Data Documentation

Track::shared Race::circuit_
private
std::shared_ptr<Game> Race::game_
private
PowerUp::shared Race::money_
private
PowerUp::shared Race::nitro_
private
int Race::number_of_laps_
private
std::vector<std::string> Race::player_nicks_
private
std::vector<Player::shared> Race::players_
private
std::vector<btVector3> Race::starting_grid_
Timer Race::timer_

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