Orxonox: orxonox::UnderAttackHealthBar Class Reference

# orxonox::UnderAttackHealthBar Class Reference

`#include <src/orxonox/overlays/hud/UnderAttackHealthBar.h>`

Inheritance diagram for orxonox::UnderAttackHealthBar:

List of all members.

## Public Member Functions

virtual void | changedOwner ()
Vector2 | getDescriptionOffset () const
Vector2 | getDescriptionPickPoint () const
void | setDescriptionOffset (const Vector2 &position)
void | setDescriptionPickPoint (const Vector2 &pickpoint)
| UnderAttackHealthBar (BaseObject *creator)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| Loads the OrxonoxOverlay.
| ~UnderAttackHealthBar ()

## Private Member Functions

void | init ()

## Private Attributes

Timer< UnderAttackHealthBar > | inittimer_
PlayerInfo * | owner_
OverlayText * | text_

## Constructor & Destructor Documentation

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

References orxonox::createExecutor(), init(), inittimer_, owner_, RegisterObject, orxonox::OverlayText::setAlignmentString(), orxonox::OverlayText::setColour(), orxonox::OverlayText::setFont(), orxonox::OrxonoxOverlay::setPickPoint(), orxonox::OverlayText::setTextSize(), text_, and orxonox::MT_Type::Vector2.

orxonox::UnderAttackHealthBar::~UnderAttackHealthBar | ( |  | ) |

References orxonox::BaseObject::isInitialized(), and text_.

## Member Function Documentation

void orxonox::UnderAttackHealthBar::changedOwner | ( |  | ) | `[virtual]`

Reimplemented from orxonox::HUDHealthBar.

References orxonox::UnderAttack::getDestroyer(), orxonox::BaseObject::getGametype(), orxonox::OrxonoxOverlay::getOwner(), orxonox::TeamDeathmatch::getTeam(), owner_, orxonox::OverlayText::setCaption(), orxonox::OrxonoxOverlay::setOwner(), SUPER, and text_.

Vector2 orxonox::UnderAttackHealthBar::getDescriptionOffset | ( |  | ) | const`[inline]`

Referenced by XMLPort().

Vector2 orxonox::UnderAttackHealthBar::getDescriptionPickPoint | ( |  | ) | const`[inline]`

Referenced by XMLPort().

void orxonox::UnderAttackHealthBar::init | ( |  | ) | `[private]`

References owner_, and orxonox::OrxonoxOverlay::setOwner().

Referenced by UnderAttackHealthBar().

void orxonox::UnderAttackHealthBar::setDescriptionOffset | ( | const Vector2 & | position | ) | `[inline]`

Referenced by XMLPort().

void orxonox::UnderAttackHealthBar::setDescriptionPickPoint | ( | const Vector2 & | pickpoint | ) | `[inline]`

Referenced by XMLPort().

void orxonox::UnderAttackHealthBar::XMLPort | ( | Element & | xmlElement,
|  | XMLPort::Mode | mode |
| ) |  |  | `[virtual]`

Loads the OrxonoxOverlay.

This has to be called before usage, otherwise strange behaviour is guaranteed! (there should be no segfaults however). XML loading and saving.

Parameters:

  | xmlelement | The XML-element
  | loading | Loading (true) or saving (false)

Returns:
  The XML-element

Reimplemented from orxonox::HUDHealthBar.

References getDescriptionOffset(), getDescriptionPickPoint(), setDescriptionOffset(), setDescriptionPickPoint(), SUPER, and XMLPortParam.

## Member Data Documentation

Timer<UnderAttackHealthBar> orxonox::UnderAttackHealthBar::inittimer_`[private]`

Referenced by UnderAttackHealthBar().

PlayerInfo* orxonox::UnderAttackHealthBar::owner_`[private]`

Reimplemented from orxonox::HUDHealthBar.

Referenced by changedOwner(), init(), and UnderAttackHealthBar().

OverlayText* orxonox::UnderAttackHealthBar::text_`[private]`

Referenced by changedOwner(), UnderAttackHealthBar(), and ~UnderAttackHealthBar().

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

- src/orxonox/overlays/hud/UnderAttackHealthBar.h
- src/orxonox/overlays/hud/UnderAttackHealthBar.cc