/* * 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: * Joel Lingg * Co-authors: * ... * */ #ifndef _StoryModeController_H__ #define _StoryModeController_H__ #include "OrxonoxPrereqs.h" #include "core/EventIncludes.h" #include "core/command/Executor.h" #include "core/config/ConfigValueIncludes.h" #include "core/XMLPort.h" #include #include "tools/interfaces/Tickable.h" #include "worldentities/ControllableEntity.h" #include "worldentities/pawns/SpaceShip.h" #include "core/CoreIncludes.h" #include "graphics/Camera.h" #include "SMCoord.h" //#include "core/XMLPort.h" //#include "gamestates/GSLevel.h" //#include #include "core/class/Identifier.h" #include "core/class/IdentifierManager.h" //#include "core/command/ConsoleCommandIncludes.h" #include "core/command/CommandExecutor.h" #include "core/object/Destroyable.h" #include "core/module/ModuleInstance.h" namespace orxonox { class _OrxonoxExport StoryModeController : public SpaceShip { public: // Implementation of a Controller needs the two following lines StoryModeController(Context* context); virtual ~StoryModeController(); // As we extend SpaceShip but just are interested in the moment of function // calling, we mark all the functions of spaceship to be override virtual void tick(float dt) override; virtual void moveFrontBack(const Vector2& value) override; virtual void moveRightLeft(const Vector2& value) override; virtual void rotateYaw(const Vector2& value) override; virtual void rotatePitch(const Vector2& value) override; virtual void rotateRoll(const Vector2& value) override; void fire(unsigned int firemode); virtual void fired(unsigned int firemode) override; virtual void boost(bool bBoost) override; private: //Add to function to set and update the Position. As setPosition isn't available, we used setLocation virtual void setLocation(int index); virtual void updatePosition(); //According to the position, this function starts the game. virtual void chooseGame(); SMCoord* selectedPos_; //Variables to keep track of time float time_; int dtime_; //Bools which get true as soon as the event they are named after has occured bool moveRight_ ; bool moveLeft_ ; bool moveForward_; bool moveBackward_; bool boostPressed_; bool init_; }; } #endif /* _WaypointController_H__ */