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

#include <game.h>

Inheritance diagram for Game:
Inheritance graph
[legend]
Collaboration diagram for Game:
Collaboration graph
[legend]

Public Types

enum  Mode { Mode::Bots, Mode::Network }
 
typedef std::shared_ptr< Gameshared
 

Public Member Functions

 Game ()
 
 Game (Session::shared session)
 
virtual ~Game ()
 
void start ()
 
void start (int seconds)
 
void shutdown ()
 
bool gui_shutdown (const CEGUI::EventArgs &event)
 
Ice::AsyncResultPtr login ()
 
void complete_login (Ice::AsyncResultPtr async_result)
 
void disconnect ()
 
void create_remote_players (Tinman::LoginInfo login_info)
 
void update_remote_players (Tinman::Snapshot snapshot)
 
void new_session ()
 
void add_race (Race::shared race)
 
void add_debug_drawer ()
 
void add_debug_adapter ()
 
void set_current_state (StateName state)
 
void change_state ()
 
Player::shared get_human_player ()
 

Public Attributes

Mode mode_
 
float delta_
 
float finish_time_
 
std::vector< std::pair< std::string, int > > race_results_
 
std::string ip_
 
std::string nick_
 
int port_
 
Scene::shared scene_
 
EventListener::shared input_
 
GUI::shared gui_
 
Sound::shared sound_
 
Physics::shared physics_
 
Animation::shared animation_
 
CarFactory::shared car_factory_
 
Session::shared session_
 
Ice::CommunicatorPtr communicator_
 
ObjectAdapterPtr debug_adapter_
 

Private Member Functions

void init ()
 
void realize ()
 
void step ()
 
void game_loop ()
 
void game_loop (int seconds)
 

Private Attributes

const float FPS = 60
 
Timer timer_
 
std::shared_ptr< StateMachinestate_machine_
 
int frame_counter_
 
PhysicsDebugDrawer::shared physics_drawer_
 

Member Typedef Documentation

typedef std::shared_ptr<Game> Game::shared

Member Enumeration Documentation

enum Game::Mode
strong
Enumerator
Bots 
Network 

Constructor & Destructor Documentation

Game::Game ( )
Game::Game ( Session::shared  session)
Game::~Game ( )
virtual

Member Function Documentation

void Game::add_debug_adapter ( )
void Game::add_debug_drawer ( )
void Game::add_race ( Race::shared  race)
void Game::change_state ( )
void Game::complete_login ( Ice::AsyncResultPtr  async_result)
void Game::create_remote_players ( Tinman::LoginInfo  login_info)
void Game::disconnect ( )
void Game::game_loop ( )
private
void Game::game_loop ( int  seconds)
private
Player::shared Game::get_human_player ( )
bool Game::gui_shutdown ( const CEGUI::EventArgs &  event)
void Game::init ( )
private
Ice::AsyncResultPtr Game::login ( )
void Game::new_session ( )
void Game::realize ( )
private
void Game::set_current_state ( StateName  state)
void Game::shutdown ( )
void Game::start ( )
void Game::start ( int  seconds)
void Game::step ( )
private
void Game::update_remote_players ( Tinman::Snapshot  snapshot)

Member Data Documentation

Animation::shared Game::animation_
CarFactory::shared Game::car_factory_
Ice::CommunicatorPtr Game::communicator_
ObjectAdapterPtr Game::debug_adapter_
float Game::delta_
float Game::finish_time_
const float Game::FPS = 60
private
int Game::frame_counter_
private
GUI::shared Game::gui_
EventListener::shared Game::input_
std::string Game::ip_
Mode Game::mode_
std::string Game::nick_
Physics::shared Game::physics_
PhysicsDebugDrawer::shared Game::physics_drawer_
private
int Game::port_
std::vector<std::pair<std::string, int> > Game::race_results_
Scene::shared Game::scene_
Session::shared Game::session_
Sound::shared Game::sound_
std::shared_ptr<StateMachine> Game::state_machine_
private
Timer Game::timer_
private

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