Orxonox: orxonox::UnderAttack Class Reference

# orxonox::UnderAttack Class Reference

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

Inheritance diagram for orxonox::UnderAttack:

List of all members.

## Public Member Functions

void | addDestroyer (Destroyer *destroyer)
virtual bool | allowPawnDamage (Pawn *victim, Pawn *originator=0)
virtual bool | allowPawnDeath (Pawn *victim, Pawn *originator=0)
virtual bool | allowPawnHit (Pawn *victim, Pawn *originator=0)
Destroyer * | getDestroyer () const
void | setConfigValues ()
| Function to collect the SetConfigValue-macro calls.
void | tick (float dt)
| Gets called every frame.
| UnderAttack (BaseObject *creator)
virtual | ~UnderAttack ()

## Protected Member Functions

virtual void | destroyedPawn (Pawn *pawn)

## Protected Attributes

Destroyer * | destroyer_
bool | gameEnded_
float | gameTime_
unsigned int | teams_
int | timesequence_

## Constructor & Destructor Documentation

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

References destroyer_, gameEnded_, gameTime_, RegisterObject, setConfigValues(), orxonox::Gametype::setHUDTemplate(), teams_, and timesequence_.

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

## Member Function Documentation

void orxonox::UnderAttack::addDestroyer | ( | Destroyer * | destroyer | ) |

References destroyer_.

Referenced by orxonox::Destroyer::Destroyer().

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

Reimplemented from orxonox::TeamDeathmatch.

References orxonox::TeamDeathmatch::allowPawnDamage(), destroyer_, gameEnded_, orxonox::ControllableEntity::getPlayer(), and orxonox::TeamDeathmatch::getTeam().

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

Reimplemented from orxonox::TeamDeathmatch.

References orxonox::TeamDeathmatch::allowPawnDeath(), destroyer_, gameEnded_, orxonox::ControllableEntity::getPlayer(), and orxonox::TeamDeathmatch::getTeam().

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

Reimplemented from orxonox::TeamDeathmatch.

References orxonox::TeamDeathmatch::allowPawnHit(), destroyer_, gameEnded_, orxonox::ControllableEntity::getPlayer(), and orxonox::TeamDeathmatch::getTeam().

void orxonox::UnderAttack::destroyedPawn | ( | Pawn * | pawn | ) | `[protected, virtual]`

Implements orxonox::PawnListener.

References orxonox::Host::Broadcast(), orxonox::CLIENTID_UNKNOWN, COUT, destroyer_, orxonox::Deathmatch::end(), gameEnded_, orxonox::Gametype::gtinfo_, orxonox::GametypeInfo::sendAnnounceMessage(), and orxonox::TeamDeathmatch::teamnumbers_.

Destroyer* orxonox::UnderAttack::getDestroyer | ( |  | ) | const`[inline]`

Referenced by orxonox::UnderAttackHealthBar::changedOwner().

void orxonox::UnderAttack::setConfigValues | ( |  | ) |

Function to collect the SetConfigValue-macro calls.

Reimplemented from orxonox::TeamDeathmatch.

References gameTime_, and SetConfigValue.

Referenced by UnderAttack().

void orxonox::UnderAttack::tick | ( | float | dt | ) | `[virtual]`

Gets called every frame.

Parameters:

  | dt | The time since the last frame in seconds

Reimplemented from orxonox::Gametype.

References orxonox::Host::Broadcast(), orxonox::CLIENTID_UNKNOWN, COUT, orxonox::Deathmatch::end(), gameEnded_, gameTime_, orxonox::Gametype::gtinfo_, orxonox::Gametype::hasStarted(), orxonox::multi_cast(), orxonox::GametypeInfo::sendAnnounceMessage(), SUPER, orxonox::TeamDeathmatch::teamnumbers_, and timesequence_.

## Member Data Documentation

Destroyer* orxonox::UnderAttack::destroyer_`[protected]`

Referenced by addDestroyer(), allowPawnDamage(), allowPawnDeath(), allowPawnHit(), destroyedPawn(), and UnderAttack().

bool orxonox::UnderAttack::gameEnded_`[protected]`

Referenced by allowPawnDamage(), allowPawnDeath(), allowPawnHit(), destroyedPawn(), tick(), and UnderAttack().

float orxonox::UnderAttack::gameTime_`[protected]`

Referenced by setConfigValues(), tick(), and UnderAttack().

unsigned int orxonox::UnderAttack::teams_`[protected]`

Reimplemented from orxonox::TeamDeathmatch.

Referenced by UnderAttack().

int orxonox::UnderAttack::timesequence_`[protected]`

Referenced by tick(), and UnderAttack().

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

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