/* * 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: * Fabian 'x3n' Landau * Co-authors: * ... * */ /** @file Attacher.h @brief Definition of the Attacher class. @ingroup Objects */ #ifndef _Actionpoint_H__ #define _Actionpoint_H__ #include "OrxonoxPrereqs.h" #include #include #include "core/XMLNameListener.h" #include "worldentities/StaticEntity.h" namespace orxonox { class _OrxonoxExport Actionpoint : public StaticEntity { public: Actionpoint(Context* context); virtual ~Actionpoint() {} //----[XML data]---- virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //----[Action data]---- void setActionXML( std::string val); std::string getActionXML(); //----[/Action data]---- //----[Protect data]---- void setProtectXML( std::string val); std::string getProtectXML(); //----[/Protect data]---- //----[Enemy data]---- void setEnemyXML( std::string val); std::string getEnemyXML(); //----[/Enemy data]---- //----[ProtectMe data]---- inline void setProtectMeXML(bool c) { this->bProtectMe_ = c; } inline bool getProtectMeXML () { return this->bProtectMe_; } //----[/ProtectMe data]---- //----[FightAll data]---- inline void setFightAllXML(bool c) { this->bFightAll_ = c; } inline bool getFightAllXML () { return this->bFightAll_; } //----[/FightAll data]---- //----[/XML data]---- void setProtect( ControllableEntity* protect); ControllableEntity* getProtect(); void setEnemy( ControllableEntity* enemy); ControllableEntity* getEnemy(); std::string getName() { if (actionName_ != "") return actionName_; else if (protectName_ != "") return protectName_; else if (enemyName_ != "") return enemyName_; else return ""; } void setLoopStart(bool value) { this->bLoopStart_ = value; } void setLoopEnd (bool value) { this->bLoopEnd_ = value; } //----["Waypoints" data]---- void setTargetPosition(const Vector3& target); Vector3 getTargetPosition (); //----[/"Waypoints" data]---- bool getLoopStart() { return this->bLoopStart_; } bool getLoopEnd(); { return this->bLoopEnd_; } private: std::string actionName_; std::string protectName_; std::string enemyName_; WeakPtr protect_; WeakPtr enemy_; bool bLoopStart_; bool bLoopEnd_; bool bProtectMe_; bool bFightAll_; Vector3 targetPosition_; }; } #endif /* _Actionpoint_H__ */