#include "OrxoBloxWall.h" #include "core/CoreIncludes.h" #include "core/XMLPort.h" #include "OrxoBlox.h" namespace orxonox { RegisterClass(OrxoBloxWall); /** @brief Constructor. Registers and initializes the object. */ OrxoBloxWall::OrxoBloxWall(Context* context) : StaticEntity(context) { RegisterObject(OrxoBloxWall); this->health_ = 1 + static_cast(rnd(6.0f)); //delay_ = false; this->orxoblox_ = this->getOrxoBlox(); OrxoBloxStones* stone = new OrxoBloxStones(this->getContext()); if(this->orxoblox_ != nullptr) { stone->setGame(this->orxoblox_); if(this->orxoblox_->getCenterpoint() != nullptr) stone->addTemplate(this->orxoblox_->getCenterpoint()->getStoneTemplate()); else orxout()<< "tetris_->getCenterpoint == nullptr in TetrisBrick.cc"<< endl; } else orxout()<< "tetris_ == nullptr in TetrisBrick.cc"<< endl; } OrxoBlox* OrxoBloxWall::getOrxoBlox() { if (this->getGametype() != nullptr && this->getGametype()->isA(Class(OrxoBlox))) { OrxoBlox* orxobloxGametype = orxonox_cast(this->getGametype()); return orxobloxGametype; } else orxout()<<"There is no Gametype for OrxoBlox! ask Anna"<< endl; return nullptr; } }