orxonox::Gametype Class Reference

#include <src/orxonox/objects/gametypes/Gametype.h>

Inheritance diagram for orxonox::Gametype:

orxonox::BaseObject orxonox::Tickable orxonox::OrxonoxClass orxonox::OrxonoxClass orxonox::Asteroids orxonox::Deathmatch orxonox::Pong orxonox::TeamDeathmatch orxonox::TeamBaseMatch orxonox::UnderAttack

List of all members.

Public Member Functions

void addBots (unsigned int amount)
virtual void addTime (float t)
virtual bool allowPawnDamage (Pawn *victim, Pawn *originator=0)
virtual bool allowPawnDeath (Pawn *victim, Pawn *originator=0)
virtual bool allowPawnHit (Pawn *victim, Pawn *originator=0)
virtual void end ()
 Gametype (BaseObject *creator)
const GametypeInfogetGametypeInfo () const
const std::stringgetHUDTemplate () const
unsigned int getNumberOfPlayers () const
const std::map< PlayerInfo
*, Player > & 
getPlayers () const
int getScore (PlayerInfo *player) const
float getStartCountdown () const
float getTime ()
bool getTimerIsActive ()
bool hasEnded () const
bool hasStarted () const
bool isStartCountdownRunning () const
void killBots (unsigned int amount=0)
virtual void pawnKilled (Pawn *victim, Pawn *killer=0)
virtual void pawnPostSpawn (Pawn *pawn)
virtual void pawnPreSpawn (Pawn *pawn)
virtual bool playerChangedName (PlayerInfo *player)
virtual void playerEntered (PlayerInfo *player)
virtual bool playerLeft (PlayerInfo *player)
virtual void playerPostSpawn (PlayerInfo *player)
virtual void playerPreSpawn (PlayerInfo *player)
virtual void playerScored (PlayerInfo *player)
virtual void playerStartsControllingPawn (PlayerInfo *player, Pawn *pawn)
virtual void playerStopsControllingPawn (PlayerInfo *player, Pawn *pawn)
virtual void playerSwitched (PlayerInfo *player, Gametype *newgametype)
virtual void playerSwitchedBack (PlayerInfo *player, Gametype *oldgametype)
void registerSpawnPoint (SpawnPoint *spawnpoint)
virtual void removeTime (float t)
virtual void resetTimer (float t)
virtual void resetTimer ()
void setConfigValues ()
 Function to collect the SetConfigValue-macro calls.
void setHUDTemplate (const std::string &name)
void setTimeLimit (float t)
virtual void start ()
void startTimer ()
void stopTimer ()
virtual void tick (float dt)
 Gets called every frame.
virtual ~Gametype ()

Protected Member Functions

virtual void assignDefaultPawnsIfNeeded ()
virtual void checkStart ()
virtual SpawnPointgetBestSpawnPoint (PlayerInfo *player) const
virtual void spawnDeadPlayersIfRequested ()
virtual void spawnPlayer (PlayerInfo *player)
virtual void spawnPlayerAsDefaultPawn (PlayerInfo *player)
virtual void spawnPlayersIfRequested ()

Protected Attributes

bool bAutoStart_
bool bForceSpawn_
SubclassIdentifier< Botbotclass_
SubclassIdentifier
< ControllableEntity
defaultControllableEntity_
GametypeInfo gtinfo_
float initialStartCountdown_
unsigned int numberOfBots_
std::map< PlayerInfo *, Playerplayers_
OverlayGroupscoreboard_
std::string scoreboardTemplate_
std::set< SpawnPoint * > spawnpoints_
float time_
float timeLimit_
bool timerIsActive_

Friends

class PlayerInfo


Constructor & Destructor Documentation

orxonox::Gametype::Gametype ( BaseObject creator  ) 

virtual orxonox::Gametype::~Gametype (  )  [inline, virtual]


Member Function Documentation

void orxonox::Gametype::addBots ( unsigned int  amount  ) 

References botclass_.

Referenced by orxonox::HumanController::addBots(), and start().

void orxonox::Gametype::addTime ( float  t  )  [virtual]

References time_, and timeLimit_.

Referenced by orxonox::CheckPoint::triggered().

bool orxonox::Gametype::allowPawnDamage ( Pawn victim,
Pawn originator = 0 
) [virtual]

bool orxonox::Gametype::allowPawnDeath ( Pawn victim,
Pawn originator = 0 
) [virtual]

bool orxonox::Gametype::allowPawnHit ( Pawn victim,
Pawn originator = 0 
) [virtual]

void orxonox::Gametype::assignDefaultPawnsIfNeeded (  )  [protected, virtual]

void orxonox::Gametype::checkStart (  )  [protected, virtual]

void orxonox::Gametype::end (  )  [virtual]

SpawnPoint * orxonox::Gametype::getBestSpawnPoint ( PlayerInfo player  )  const [protected, virtual]

Reimplemented in orxonox::TeamDeathmatch.

References orxonox::rnd(), and spawnpoints_.

Referenced by spawnPlayer(), and spawnPlayerAsDefaultPawn().

const GametypeInfo* orxonox::Gametype::getGametypeInfo (  )  const [inline]

const std::string& orxonox::Gametype::getHUDTemplate (  )  const [inline]

unsigned int orxonox::Gametype::getNumberOfPlayers (  )  const [inline]

const std::map<PlayerInfo*, Player>& orxonox::Gametype::getPlayers (  )  const [inline]

int orxonox::Gametype::getScore ( PlayerInfo player  )  const

References players_.

Referenced by orxonox::PongScore::tick().

float orxonox::Gametype::getStartCountdown (  )  const [inline]

float orxonox::Gametype::getTime (  )  [inline]

Referenced by orxonox::HUDTimer::tick().

bool orxonox::Gametype::getTimerIsActive (  )  [inline]

Referenced by orxonox::HUDTimer::tick().

bool orxonox::Gametype::hasEnded (  )  const [inline]

bool orxonox::Gametype::hasStarted (  )  const [inline]

bool orxonox::Gametype::isStartCountdownRunning (  )  const [inline]

void orxonox::Gametype::killBots ( unsigned int  amount = 0  ) 

void orxonox::Gametype::pawnKilled ( Pawn victim,
Pawn killer = 0 
) [virtual]

void orxonox::Gametype::pawnPostSpawn ( Pawn pawn  )  [virtual]

void orxonox::Gametype::pawnPreSpawn ( Pawn pawn  )  [virtual]

bool orxonox::Gametype::playerChangedName ( PlayerInfo player  )  [virtual]

void orxonox::Gametype::playerEntered ( PlayerInfo player  )  [virtual]

bool orxonox::Gametype::playerLeft ( PlayerInfo player  )  [virtual]

void orxonox::Gametype::playerPostSpawn ( PlayerInfo player  )  [virtual]

Referenced by spawnPlayer().

void orxonox::Gametype::playerPreSpawn ( PlayerInfo player  )  [virtual]

Referenced by spawnPlayer().

void orxonox::Gametype::playerScored ( PlayerInfo player  )  [virtual]

void orxonox::Gametype::playerStartsControllingPawn ( PlayerInfo player,
Pawn pawn 
) [virtual]

Reimplemented in orxonox::TeamDeathmatch.

Referenced by orxonox::Pawn::setPlayer().

void orxonox::Gametype::playerStopsControllingPawn ( PlayerInfo player,
Pawn pawn 
) [virtual]

void orxonox::Gametype::playerSwitched ( PlayerInfo player,
Gametype newgametype 
) [virtual]

void orxonox::Gametype::playerSwitchedBack ( PlayerInfo player,
Gametype oldgametype 
) [virtual]

void orxonox::Gametype::registerSpawnPoint ( SpawnPoint spawnpoint  )  [inline]

void orxonox::Gametype::removeTime ( float  t  )  [virtual]

References time_, and timeLimit_.

void orxonox::Gametype::resetTimer ( float  t  )  [virtual]

References time_, and timeLimit_.

void orxonox::Gametype::resetTimer (  )  [virtual]

References timeLimit_.

void orxonox::Gametype::setConfigValues (  ) 

Function to collect the SetConfigValue-macro calls.

Reimplemented from orxonox::OrxonoxClass.

Reimplemented in orxonox::TeamDeathmatch, and orxonox::UnderAttack.

References bAutoStart_, bForceSpawn_, initialStartCountdown_, numberOfBots_, scoreboardTemplate_, and SetConfigValue.

Referenced by Gametype().

void orxonox::Gametype::setHUDTemplate ( const std::string name  )  [inline]

void orxonox::Gametype::setTimeLimit ( float  t  )  [inline]

void orxonox::Gametype::spawnDeadPlayersIfRequested (  )  [protected, virtual]

void orxonox::Gametype::spawnPlayer ( PlayerInfo player  )  [protected, virtual]

void orxonox::Gametype::spawnPlayerAsDefaultPawn ( PlayerInfo player  )  [protected, virtual]

void orxonox::Gametype::spawnPlayersIfRequested (  )  [protected, virtual]

References bForceSpawn_, players_, and spawnPlayer().

Referenced by start().

void orxonox::Gametype::start (  )  [virtual]

void orxonox::Gametype::startTimer (  )  [inline]

void orxonox::Gametype::stopTimer (  )  [inline]

void orxonox::Gametype::tick ( float  dt  )  [virtual]


Friends And Related Function Documentation

friend class PlayerInfo [friend]


Member Data Documentation

Referenced by addBots(), and orxonox::Pong::Pong().

unsigned int orxonox::Gametype::numberOfBots_ [protected]

Referenced by Gametype(), setConfigValues(), and start().

Referenced by Gametype().

Referenced by Gametype(), and setConfigValues().

Referenced by getBestSpawnPoint().

float orxonox::Gametype::time_ [protected]

float orxonox::Gametype::timeLimit_ [protected]


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

Generated on Tue Jul 28 16:22:32 2009 for Orxonox by  doxygen 1.5.6