Orxonox: orxonox::Pong Class Reference

# orxonox::Pong Class Reference

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

Inheritance diagram for orxonox::Pong:

List of all members.

## Public Member Functions

virtual void | end ()
PlayerInfo * | getLeftPlayer () const
PlayerInfo * | getRightPlayer () const
virtual void | playerScored (PlayerInfo *player)
| Pong (BaseObject *creator)
void | setCenterpoint (PongCenterpoint *center)
virtual void | spawnPlayer (PlayerInfo *player)
virtual void | start ()
virtual | ~Pong ()

## Protected Member Functions

void | startBall ()

## Protected Attributes

PongBall * | ball_
PongBat * | bat_ [2]
PongCenterpoint * | center_
Timer< Pong > | starttimer_

## Constructor & Destructor Documentation

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

References ball_, bat_, orxonox::Gametype::botclass_, center_, Class, orxonox::createExecutor(), RegisterObject, orxonox::Gametype::setHUDTemplate(), startBall(), and starttimer_.

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

## Member Function Documentation

void orxonox::Pong::end | ( |  | ) | `[virtual]`

Reimplemented from orxonox::Deathmatch.

References ball_, and orxonox::Deathmatch::end().

PlayerInfo * orxonox::Pong::getLeftPlayer | ( |  | ) | const

References bat_, and orxonox::ControllableEntity::getPlayer().

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

PlayerInfo * orxonox::Pong::getRightPlayer | ( |  | ) | const

References bat_, and orxonox::ControllableEntity::getPlayer().

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

void orxonox::Pong::playerScored | ( | PlayerInfo * | player | ) | `[virtual]`

Reimplemented from orxonox::Deathmatch.

References ball_, bat_, center_, orxonox::BaseObject::fireEvent(), orxonox::PongCenterpoint::getFieldDimension(), orxonox::BaseObject::getName(), orxonox::Gametype::gtinfo_, orxonox::Deathmatch::playerScored(), orxonox::GametypeInfo::sendAnnounceMessage(), orxonox::ControllableEntity::setPosition(), orxonox::MovableEntity::setPosition(), orxonox::PongBall::setSpeed(), orxonox::MobileEntity::setVelocity(), and starttimer_.

void orxonox::Pong::setCenterpoint | ( | PongCenterpoint * | center | ) | `[inline]`

Referenced by orxonox::PongCenterpoint::checkGametype().

void orxonox::Pong::spawnPlayer | ( | PlayerInfo * | player | ) | `[virtual]`

Reimplemented from orxonox::Gametype.

References orxonox::PlayerState::Alive, ball_, bat_, Class, orxonox::PlayerInfo::getController(), orxonox::OrxonoxClass::isA(), orxonox::Gametype::players_, orxonox::PongAI::setPongBall(), and orxonox::PlayerInfo::startControl().

void orxonox::Pong::start | ( |  | ) | `[virtual]`

Reimplemented from orxonox::Deathmatch.

References orxonox::BaseObject::addTemplate(), orxonox::WorldEntity::attach(), ball_, bat_, orxonox::Gametype::bForceSpawn_, center_, COUT, orxonox::MT_Type::Degree, orxonox::PongCenterpoint::getBalltemplate(), orxonox::PongCenterpoint::getBatLength(), orxonox::PongCenterpoint::getBatSpeed(), orxonox::PongCenterpoint::getBattemplate(), orxonox::PongCenterpoint::getFieldDimension(), orxonox::PongBall::setBatLength(), orxonox::PongBall::setBats(), orxonox::PongBall::setFieldDimension(), orxonox::PongBat::setFieldHeight(), orxonox::PongBat::setLength(), orxonox::ControllableEntity::setPosition(), orxonox::MovableEntity::setPosition(), orxonox::PongBat::setSpeed(), orxonox::PongBall::setSpeed(), orxonox::Deathmatch::start(), starttimer_, and orxonox::WorldEntity::yaw().

void orxonox::Pong::startBall | ( |  | ) | `[protected]`

References ball_, center_, orxonox::PongCenterpoint::getBallSpeed(), and orxonox::PongBall::setSpeed().

Referenced by Pong().

## Member Data Documentation

PongBall* orxonox::Pong::ball_`[protected]`

Referenced by end(), playerScored(), Pong(), spawnPlayer(), start(), and startBall().

PongBat* orxonox::Pong::bat_[2]`[protected]`

Referenced by getLeftPlayer(), getRightPlayer(), playerScored(), Pong(), spawnPlayer(), and start().

PongCenterpoint* orxonox::Pong::center_`[protected]`

Referenced by playerScored(), Pong(), start(), and startBall().

Timer<Pong> orxonox::Pong::starttimer_`[protected]`

Referenced by playerScored(), Pong(), and start().

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

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