/* * 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: * ... * */ #ifndef _CommonController_H__ #define _CommonController_H__ #include "controllers/Controller.h" #include "worldentities/ControllableEntity.h" /*#include "worldentities/pawns/Pawn.h" */ namespace orxonox { class _OrxonoxExport CommonController : public Controller { public: static const float ACTION_INTERVAL = 1.0f; CommonController(Context* context); virtual ~CommonController(); enum FormationMode { VEE, FINGER4, DIAMOND, WALL }; virtual void setFormationMode(FormationMode val) { this->formationMode_ = val; } inline FormationMode getFormationMode() const { return this->formationMode_; } enum Rank { NONE, SECTIONLEADER, DIVISIONLEADER, WINGMAN }; virtual void setRank(Rank val) { this->rank_ = val; } inline Rank getRank() const { return this->rank_; } virtual bool setWingman(CommonController* wingman); virtual bool hasWingman(); void setTargetOrientation(const Quaternion& orient); void setTargetOrientation(ControllableEntity* target); void setTargetPosition(const Vector3& target); /*void spin(); void turn180();*/ protected: void moveToPosition(const Vector3& target); void moveToTargetPosition(); //enum Mode {ROCKET, ATTACK, MOVE, HOLD};//TODO; implement DEFENCE, MOVING modes //Mode mode_; void copyOrientation(const Quaternion& orient); void copyTargetOrientation(); /* bool isCloseAtTarget(float distance) const; void doFire(); void aimAtTarget(); bool isLookingAtTarget(float angle) const; std::map weaponModes_; // projectiles_; // target_; bool bShooting_; FormationMode formationMode_; Rank rank_; private: }; } #endif /* _CommonController_H__ */