#include <src/orxonox/objects/gametypes/Pong.h>
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_ |
orxonox::Pong::Pong | ( | BaseObject * | creator | ) |
virtual orxonox::Pong::~Pong | ( | ) | [inline, virtual] |
void orxonox::Pong::end | ( | ) | [virtual] |
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] |
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().
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().