/* * 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: * Julien Kindle * Co-authors: * * */ /** @file SOBTube.h @brief Declaration of the SOBTube class. This class is used for the tubes in the game. It adds the function that the figure can slip through Tubes. */ #ifndef _SOBTube_H__ #define _SOBTube_H__ #include "superorxobros/SOBPrereqs.h" #include "worldentities/MovableEntity.h" //includes MovableEntity from WorldEntity important because Superclass is MovableEntity #include "objects/collisionshapes/BoxCollisionShape.h" namespace orxonox { class _SOBExport SOBTube : public MovableEntity { public: SOBTube(Context* context); virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override; virtual void tick(float dt) override; //tick function override for removing collisionshape and adding them void setcool(const bool cool) //here you could add additional information about tube { this->cool_ = cool; } bool getcool() const { return cool_; } BoxCollisionShape* left; //Collision shape for removing collisionshape of the tube CollisionType a; //different Type of collision (none, dynamic for tubes) CollisionType b; float u; //helping variables int k; int Height; int Right; int Left; bool movedown; //says if it is allowed to move through tube bool hasCollided_; //says if figure has Collided with tube ones protected: bool cool_; }; } #endif /* _SOBTube_H__ */