Orxonox: orxonox::TeamBaseMatch Class Reference

# orxonox::TeamBaseMatch Class Reference

`#include <src/orxonox/objects/gametypes/TeamBaseMatch.h>`

Inheritance diagram for orxonox::TeamBaseMatch:

List of all members.

## 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_

## Constructor & Destructor Documentation

orxonox::TeamBaseMatch::TeamBaseMatch | ( | BaseObject * | creator | ) |

References orxonox::createExecutor(), outputTimer_, pointsTeam1_, pointsTeam2_, RegisterObject, scoreTimer_, orxonox::Gametype::setHUDTemplate(), showPoints(), and winPoints().

virtual orxonox::TeamBaseMatch::~TeamBaseMatch | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

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().

bool orxonox::TeamBaseMatch::allowPawnDamage | ( | Pawn * | victim,
|  | Pawn * | originator |
| ) |  |  | `[virtual]`

Reimplemented from orxonox::TeamDeathmatch.

References orxonox::TeamDeathmatch::allowPawnDamage(), bases_, and pawnsAreInTheSameTeam().

bool orxonox::TeamBaseMatch::allowPawnDeath | ( | Pawn * | victim,
|  | Pawn * | originator = `0` |
| ) |  |  | `[virtual]`

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]`

References orxonox::CLIENTID_UNKNOWN, COUT, orxonox::Deathmatch::end(), orxonox::Gametype::gtinfo_, outputTimer_, pointsTeam1_, pointsTeam2_, scoreTimer_, orxonox::GametypeInfo::sendAnnounceMessage(), and orxonox::TeamDeathmatch::teamnumbers_.

Referenced by addTeamPoints().

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 | ) |

References pointsTeam1_, and pointsTeam2_.

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

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().

## Member Data Documentation

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().

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

- src/orxonox/objects/gametypes/TeamBaseMatch.h
- src/orxonox/objects/gametypes/TeamBaseMatch.cc