#include <src/orxonox/objects/gametypes/TeamBaseMatch.h>
Public Member Functions | |
void | addBase (TeamBaseMatchBase *base) |
void | addTeamPoints (int team, int points) |
virtual bool | allowPawnDamage (Pawn *victim, Pawn *originator) |
virtual bool | allowPawnDeath (Pawn *victim, Pawn *originator=0) |
virtual void | endGame () |
TeamBaseMatchBase * | getBase (unsigned int index) const |
int | getTeamBases (int team) |
int | getTeamPoints (int team) |
virtual void | playerScored (PlayerInfo *player) |
virtual void | showPoints () |
TeamBaseMatch (BaseObject *creator) | |
virtual | ~TeamBaseMatch () |
Protected Member Functions | |
bool | pawnsAreInTheSameTeam (Pawn *pawn1, TeamBaseMatchBase *base) |
void | winPoints () |
Protected Attributes | |
std::set< TeamBaseMatchBase * > | bases_ |
Timer< TeamBaseMatch > | outputTimer_ |
int | pointsTeam1_ |
int | pointsTeam2_ |
Timer< TeamBaseMatch > | scoreTimer_ |
orxonox::TeamBaseMatch::TeamBaseMatch | ( | BaseObject * | creator | ) |
virtual orxonox::TeamBaseMatch::~TeamBaseMatch | ( | ) | [inline, virtual] |
void orxonox::TeamBaseMatch::addBase | ( | TeamBaseMatchBase * | base | ) |
References bases_, orxonox::TeamBaseMatchBase::setState(), and orxonox::BaseState::Uncontrolled.
Referenced by orxonox::TeamBaseMatchBase::TeamBaseMatchBase().
void orxonox::TeamBaseMatch::addTeamPoints | ( | int | team, | |
int | points | |||
) |
References endGame(), pointsTeam1_, and pointsTeam2_.
Referenced by playerScored(), and winPoints().
Reimplemented from orxonox::TeamDeathmatch.
References orxonox::TeamDeathmatch::allowPawnDamage(), bases_, and pawnsAreInTheSameTeam().
Reimplemented from orxonox::TeamDeathmatch.
References orxonox::TeamDeathmatch::allowPawnDeath(), bases_, orxonox::BaseState::ControlTeam1, orxonox::BaseState::ControlTeam2, orxonox::Pawn::getInitialHealth(), orxonox::ControllableEntity::getPlayer(), orxonox::TeamDeathmatch::getTeam(), orxonox::Gametype::gtinfo_, orxonox::GametypeInfo::sendAnnounceMessage(), orxonox::Pawn::setHealth(), and orxonox::TeamBaseMatchBase::setState().
void orxonox::TeamBaseMatch::endGame | ( | ) | [virtual] |
TeamBaseMatchBase * orxonox::TeamBaseMatch::getBase | ( | unsigned int | index | ) | const |
References bases_.
int orxonox::TeamBaseMatch::getTeamBases | ( | int | team | ) |
References bases_, orxonox::BaseState::ControlTeam1, and orxonox::BaseState::ControlTeam2.
Referenced by orxonox::TeamBaseMatchScore::tick().
int orxonox::TeamBaseMatch::getTeamPoints | ( | int | team | ) |
bool orxonox::TeamBaseMatch::pawnsAreInTheSameTeam | ( | Pawn * | pawn1, | |
TeamBaseMatchBase * | base | |||
) | [protected] |
References orxonox::BaseState::ControlTeam1, orxonox::BaseState::ControlTeam2, orxonox::ControllableEntity::getPlayer(), orxonox::TeamBaseMatchBase::getState(), orxonox::TeamDeathmatch::getTeam(), orxonox::TeamDeathmatch::teamnumbers_, and orxonox::BaseState::Uncontrolled.
Referenced by allowPawnDamage().
void orxonox::TeamBaseMatch::playerScored | ( | PlayerInfo * | player | ) | [virtual] |
Reimplemented from orxonox::Deathmatch.
References addTeamPoints(), and orxonox::TeamDeathmatch::getTeam().
void orxonox::TeamBaseMatch::showPoints | ( | ) | [virtual] |
References COUT, orxonox::Gametype::hasEnded(), orxonox::Gametype::hasStarted(), pointsTeam1_, and pointsTeam2_.
Referenced by TeamBaseMatch().
void orxonox::TeamBaseMatch::winPoints | ( | ) | [protected] |
References addTeamPoints(), bases_, orxonox::BaseState::ControlTeam1, and orxonox::BaseState::ControlTeam2.
Referenced by TeamBaseMatch().
std::set<TeamBaseMatchBase*> orxonox::TeamBaseMatch::bases_ [protected] |
Referenced by addBase(), allowPawnDamage(), allowPawnDeath(), getBase(), getTeamBases(), and winPoints().
Timer<TeamBaseMatch> orxonox::TeamBaseMatch::outputTimer_ [protected] |
Referenced by endGame(), and TeamBaseMatch().
int orxonox::TeamBaseMatch::pointsTeam1_ [protected] |
Referenced by addTeamPoints(), endGame(), getTeamPoints(), showPoints(), and TeamBaseMatch().
int orxonox::TeamBaseMatch::pointsTeam2_ [protected] |
Referenced by addTeamPoints(), endGame(), getTeamPoints(), showPoints(), and TeamBaseMatch().
Timer<TeamBaseMatch> orxonox::TeamBaseMatch::scoreTimer_ [protected] |
Referenced by endGame(), and TeamBaseMatch().