#include <src/orxonox/objects/Level.h>
Public Member Functions | |
const std::string & | getDescription () const |
Level (BaseObject *creator) | |
void | loadAmbientSound (const std::string &filename) |
void | playerEntered (PlayerInfo *player) |
void | playerLeft (PlayerInfo *player) |
void | registerVariables () |
void | setDescription (const std::string &description) |
virtual void | XMLPort (Element &xmlelement, XMLPort::Mode mode) |
XML loading and saving. | |
virtual | ~Level () |
Private Member Functions | |
void | addObject (BaseObject *object) |
const std::string & | getGametypeString () const |
BaseObject * | getObject (unsigned int index) const |
void | networkcallback_applyXMLFile () |
void | setGametypeString (const std::string &gametype) |
Private Attributes | |
SoundBase * | ambientsound_ |
std::string | description_ |
std::string | gametype_ |
std::list< BaseObject * > | objects_ |
XMLFile * | xmlfile_ |
std::string | xmlfilename_ |
orxonox::Level::Level | ( | BaseObject * | creator | ) |
orxonox::Level::~Level | ( | ) | [virtual] |
void orxonox::Level::addObject | ( | BaseObject * | object | ) | [private] |
const std::string& orxonox::Level::getDescription | ( | ) | const [inline] |
Referenced by XMLPort().
const std::string& orxonox::Level::getGametypeString | ( | ) | const [inline, private] |
Referenced by XMLPort().
BaseObject * orxonox::Level::getObject | ( | unsigned int | index | ) | const [private] |
void orxonox::Level::loadAmbientSound | ( | const std::string & | filename | ) |
References ambientsound_, orxonox::SoundBase::loadFile(), and orxonox::SoundBase::play().
Referenced by XMLPort().
void orxonox::Level::networkcallback_applyXMLFile | ( | ) | [private] |
References Class, COUT, orxonox::ClassTreeMask::exclude(), orxonox::Core::getMediaPathString(), orxonox::ClassTreeMask::include(), orxonox::Loader::open(), xmlfile_, and xmlfilename_.
Referenced by registerVariables().
void orxonox::Level::playerEntered | ( | PlayerInfo * | player | ) |
void orxonox::Level::playerLeft | ( | PlayerInfo * | player | ) |
References COUT, orxonox::PlayerInfo::getClientID(), orxonox::BaseObject::getName(), and orxonox::BaseObject::setGametype().
Referenced by orxonox::PlayerManager::clientDisconnected().
void orxonox::Level::registerVariables | ( | ) |
void orxonox::Level::setDescription | ( | const std::string & | description | ) | [inline] |
Referenced by XMLPort().
void orxonox::Level::setGametypeString | ( | const std::string & | gametype | ) | [private] |
References Class, ClassByString, COUT, orxonox::Identifier::fabricate(), gametype_, orxonox::OrxonoxClass::getIdentifier(), orxonox::LevelManager::getInstance(), orxonox::LevelManager::getInstancePtr(), orxonox::Identifier::getName(), orxonox::Identifier::isA(), objects_, orxonox::LevelManager::requestActivity(), and orxonox::BaseObject::setGametype().
Referenced by XMLPort().
void orxonox::Level::XMLPort | ( | Element & | xmlelement, | |
XMLPort::Mode | mode | |||
) | [virtual] |
XML loading and saving.
xmlelement | The XML-element | |
loading | Loading (true) or saving (false) |
Reimplemented from orxonox::BaseObject.
References addObject(), getDescription(), getGametypeString(), getObject(), loadAmbientSound(), setDescription(), setGametypeString(), SUPER, XMLPortObjectExtended, XMLPortParam, and XMLPortParamLoadOnly.
SoundBase* orxonox::Level::ambientsound_ [private] |
Referenced by loadAmbientSound(), and ~Level().
std::string orxonox::Level::description_ [private] |
Referenced by registerVariables().
std::string orxonox::Level::gametype_ [private] |
std::list<BaseObject*> orxonox::Level::objects_ [private] |
Referenced by addObject(), getObject(), and setGametypeString().
XMLFile* orxonox::Level::xmlfile_ [private] |
Referenced by networkcallback_applyXMLFile(), and ~Level().
std::string orxonox::Level::xmlfilename_ [private] |
Referenced by Level(), networkcallback_applyXMLFile(), and registerVariables().