/* * ORXONOX - the hottest 3D action shooter ever to exist * > www.orxonox.net < * * * License notice: * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Author: * Viviane Yang * Co-authors: * ... * */ /** @file Asteroids2DCenterPoint.h @brief Declaration of the Asteroids2DCenterPoint class. @ingroup Asteroids2D */ #ifndef _Asteroids2DCenterPoint_H__ #define _Asteroids2DCenterPoint_H__ #include "asteroids2D/Asteroids2DPrereqs.h" #include "worldentities/StaticEntity.h" namespace orxonox { class _Asteroids2DExport Asteroids2DCenterPoint : public StaticEntity { public: Asteroids2DCenterPoint(Context* context); //checks whether the gametype is actually Asteroids2D. virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a PongCenterpoint through XML. /** @brief Set the dimensions of the playing field. @param dimension A vector with the width of the playing field as first component and the height as second. */ void setFieldDimension(const Vector2& dimension) { this->width_ = dimension.x; this->height_ = dimension.y; } /** @brief Get the dimensions of the playing field. @return Returns a vector with the width of the playing field as first component and the height as second. */ Vector2 getFieldDimension() const { return Vector2(this->width_, this->height_); } private: void checkGametype(); //checks whether the gametype actually is Asteroids2D float width_, height_; }; } #endif /* _Asteroids2DCenterPoint_H__ */