#include <ClientSession.h>
|
| ClientSession (std::shared_ptr< Rules > rules) |
|
virtual | ~ClientSession () |
|
void | AddMessage (const char *pMessage) |
|
virtual void | AddMessageKey (char pKey) |
|
bool | AdvancePhase () |
| Advance to the next phase. More...
|
|
bool | AdvancePhase (Phase nextPhase) |
| Advance the current phase. More...
|
|
void | AttachPlayer (int i, std::shared_ptr< Player::Player > player) |
| Attach a player to the session. More...
|
|
void | CountdownToNextPhase (const Util::Duration &duration) |
| Set a countdown timer to the next phase. More...
|
|
const MR_UInt8 * | GetBackImage () const |
|
std::shared_ptr< Util::Clock > | GetClock () |
|
std::shared_ptr< Util::Clock > | GetCountdown () |
|
const Model::Level * | GetCurrentLevel () const |
|
virtual void | GetCurrentMessage (char *pDest) const |
|
virtual void | GetHitResult (int pPosition, const char *&pPlayerName, int &pId, BOOL &pConnected, int &pNbHitOther, int &pNbHitHimself) const |
|
BOOL | GetMessageStack (int pLevel, char *pDest, int pExpiration) const |
|
std::shared_ptr< HoverScript::MetaSession > | GetMeta () const |
|
virtual int | GetNbPlayers () const |
|
Phase | GetPhase () const |
|
virtual Player::Player * | GetPlayer (int i) const |
|
virtual int | GetRank (const MainCharacter::MainCharacter *pPlayer) const |
|
virtual void | GetResult (int pPosition, const char *&pPlayerName, int &pId, BOOL &pConnected, int &pNbLap, MR_SimulationTime &pFinishTime, MR_SimulationTime &pBestLap) const |
|
std::shared_ptr< Rules > | GetRules () |
|
MR_SimulationTime | GetSimulationTime () const |
|
std::shared_ptr< HoverScript::TrackPeer > | GetTrackPeer () const |
|
virtual bool | LoadNew (const char *pTitle, Script::Core &scripting, std::shared_ptr< Model::Track > track, VideoServices::VideoBuffer *pVideo) |
|
virtual void | Process () |
|
virtual int | ResultAvaillable () const |
|
void | SetMeta (std::shared_ptr< HoverScript::MetaSession > meta) |
|
virtual void | SetSimulationTime (MR_SimulationTime pTime) |
|
virtual std::shared_ptr< Player::Player > | SharePlayer (int i) const |
|
void | UpdateCharacterSimulationTimes () |
|
Enumerator |
---|
INIT |
|
PREGAME |
Players are at the starting line.
|
PLAYING |
Players are released and the clock is running.
|
POSTGAME |
The first player has finished; waiting for others.
|
DONE |
All players have finished.
|
HoverRace::Client::ClientSession::ClientSession |
( |
| ) |
|
|
privatedelete |
HoverRace::Client::ClientSession::ClientSession |
( |
std::shared_ptr< Rules > |
rules | ) |
|
HoverRace::Client::ClientSession::~ClientSession |
( |
| ) |
|
|
virtual |
void HoverRace::Client::ClientSession::AddMessage |
( |
const char * |
pMessage | ) |
|
void HoverRace::Client::ClientSession::AddMessageKey |
( |
char |
pKey | ) |
|
|
virtual |
bool HoverRace::Client::ClientSession::AdvancePhase |
( |
| ) |
|
Advance to the next phase.
- Returns
true
if the new phase was set successfully, false
otherwise.
bool HoverRace::Client::ClientSession::AdvancePhase |
( |
Phase |
nextPhase | ) |
|
Advance the current phase.
The new phase must be equal to or later than the current phase. If any phases are skipped, then then the events for the skipped phases will still be called.
- Parameters
-
nextPhase | The requested next phase. |
- Returns
true
if the new phase was set successfully, false
otherwise.
void HoverRace::Client::ClientSession::AttachPlayer |
( |
int |
i, |
|
|
std::shared_ptr< Player::Player > |
player |
|
) |
| |
Attach a player to the session.
- Parameters
-
i | Zero-based index of the player slot. |
player | The player (may not be nullptr ). |
void HoverRace::Client::ClientSession::CountdownToNextPhase |
( |
const Util::Duration & |
duration | ) |
|
Set a countdown timer to the next phase.
- Parameters
-
duration | The duration (must be positive). |
const MR_UInt8 * HoverRace::Client::ClientSession::GetBackImage |
( |
| ) |
const |
std::shared_ptr<Util::Clock> HoverRace::Client::ClientSession::GetClock |
( |
| ) |
|
|
inline |
std::shared_ptr<Util::Clock> HoverRace::Client::ClientSession::GetCountdown |
( |
| ) |
|
|
inline |
const Model::Level * HoverRace::Client::ClientSession::GetCurrentLevel |
( |
| ) |
const |
void HoverRace::Client::ClientSession::GetCurrentMessage |
( |
char * |
pDest | ) |
const |
|
virtual |
void HoverRace::Client::ClientSession::GetHitResult |
( |
int |
pPosition, |
|
|
const char *& |
pPlayerName, |
|
|
int & |
pId, |
|
|
BOOL & |
pConnected, |
|
|
int & |
pNbHitOther, |
|
|
int & |
pNbHitHimself |
|
) |
| const |
|
virtual |
BOOL HoverRace::Client::ClientSession::GetMessageStack |
( |
int |
pLevel, |
|
|
char * |
pDest, |
|
|
int |
pExpiration |
|
) |
| const |
int HoverRace::Client::ClientSession::GetNbPlayers |
( |
| ) |
const |
|
virtual |
Phase HoverRace::Client::ClientSession::GetPhase |
( |
| ) |
const |
|
inline |
virtual Player::Player* HoverRace::Client::ClientSession::GetPlayer |
( |
int |
i | ) |
const |
|
inlinevirtual |
void HoverRace::Client::ClientSession::GetResult |
( |
int |
pPosition, |
|
|
const char *& |
pPlayerName, |
|
|
int & |
pId, |
|
|
BOOL & |
pConnected, |
|
|
int & |
pNbLap, |
|
|
MR_SimulationTime & |
pFinishTime, |
|
|
MR_SimulationTime & |
pBestLap |
|
) |
| const |
|
virtual |
std::shared_ptr<Rules> HoverRace::Client::ClientSession::GetRules |
( |
| ) |
|
|
inline |
void HoverRace::Client::ClientSession::Process |
( |
| ) |
|
|
virtual |
int HoverRace::Client::ClientSession::ResultAvaillable |
( |
| ) |
const |
|
virtual |
virtual std::shared_ptr<Player::Player> HoverRace::Client::ClientSession::SharePlayer |
( |
int |
i | ) |
const |
|
inlinevirtual |
void HoverRace::Client::ClientSession::UpdateCharacterSimulationTimes |
( |
| ) |
|
const int HoverRace::Client::ClientSession::CHAT_MESSAGE_STACK = 8 |
|
staticprivate |
boost::mutex HoverRace::Client::ClientSession::chatMutex |
|
mutableprivate |
std::shared_ptr<Util::Clock> HoverRace::Client::ClientSession::clock |
|
private |
std::shared_ptr<Util::Clock> HoverRace::Client::ClientSession::countdown |
|
private |
boost::signals2::scoped_connection HoverRace::Client::ClientSession::countdownConn |
|
private |
const int HoverRace::Client::ClientSession::MAX_PLAYERS = 4 |
|
staticprivate |
MR_UInt8* HoverRace::Client::ClientSession::mBackImage |
|
private |
Phase HoverRace::Client::ClientSession::phase |
|
private |
std::shared_ptr<Rules> HoverRace::Client::ClientSession::rules |
|
private |
The documentation for this class was generated from the following files: