Orxonox: orxonox::HealthImmediate Class Reference

# orxonox::HealthImmediate Class Reference

Health-item, immediatly recovers health when picked up. More...

`#include <src/orxonox/objects/pickup/items/HealthImmediate.h>`

Inheritance diagram for orxonox::HealthImmediate:

List of all members.

## Public Member Functions

float | getRecoveredHealth () const
| HealthImmediate (BaseObject *creator)
virtual bool | pickedUp (Pawn *pawn)
| Method invoked when the item gets picked up.
void | setRecoveredHealth (float recovery)
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode)
| XMLPort.
virtual | ~HealthImmediate ()

## Private Attributes

float | recoveredHealth_

## Detailed Description

Health-item, immediatly recovers health when picked up.

## Constructor & Destructor Documentation

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

References recoveredHealth_, and RegisterObject.

orxonox::HealthImmediate::~HealthImmediate | ( |  | ) | `[virtual]`

## Member Function Documentation

float orxonox::HealthImmediate::getRecoveredHealth | ( |  | ) | const`[inline]`

Referenced by XMLPort().

bool orxonox::HealthImmediate::pickedUp | ( | Pawn * | pawn | ) | `[virtual]`

Method invoked when the item gets picked up.

Has to be overridden for an item to work, should contain a call to addTo().

Parameters:

  | pawn | Pawn who picks up the item.

Returns:
  Returns whether the pawn was able to pick up the item.

Reimplemented from orxonox::BaseItem.

References orxonox::Pawn::addHealth(), orxonox::Pawn::getHealth(), orxonox::Pawn::getMaxHealth(), and recoveredHealth_.

void orxonox::HealthImmediate::setRecoveredHealth | ( | float | recovery | ) | `[inline]`

Referenced by XMLPort().

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

XMLPort.

XMLPort for BaseItem.

Parameters:

  | xmlelement | Element of the XML-file.
  | mode | XMLPort mode to use.

Reimplemented from orxonox::BaseItem.

References getRecoveredHealth(), setRecoveredHealth(), SUPER, and XMLPortParam.

## Member Data Documentation

float orxonox::HealthImmediate::recoveredHealth_`[private]`

Referenced by HealthImmediate(), and pickedUp().

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

- src/orxonox/objects/pickup/items/HealthImmediate.h
- src/orxonox/objects/pickup/items/HealthImmediate.cc