/*! * @file turbine_hover.h * Implements the Control of a TurbineHover */ #ifndef _TURBINE_HOVER_H #define _TURBINE_HOVER_H #include "playable.h" #include "color.h" // Forward Declaration class ParticleEmitter; class ParticleSystem; class TurbineHover : public Playable { ObjectListDeclaration(TurbineHover); public: TurbineHover(const std::string& fileName); TurbineHover(const TiXmlElement* root = NULL); virtual ~TurbineHover(); void setBoostColor(const Color& color); virtual void loadParams(const TiXmlElement* root); virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f); virtual void enter(); virtual void leave(); virtual void setTeam(int teamID); virtual void postSpawn(); virtual void leftWorld(); virtual void respawn(); virtual void collidesWith(WorldEntity* entity, const Vector& location); virtual void tick(float dt); virtual void draw() const; virtual void process(const Event &event); private: void init(); void movement(float dt); private: bool bForward; //!< forward button pressed. bool bBackward; //!< backward button pressed. bool bLeft; //!< left button pressed. bool bRight; //!< right button pressed. bool bAscend; //!< ascend button pressed. bool bDescend; //!< descend button presses. int yInvert; float mouseSensitivity; //!< the mouse sensitivity PNode wingNodeLeft; PNode wingNodeRight; PNode rotorNodeLeft; PNode rotorNodeRight; PNode cameraNode; float cameraLook; float rotation; // Vector velocity; //!< the velocity of the TurbineHover. Quaternion direction; //!< the direction of the TurbineHover. float travelSpeed; //!< the current speed of the Hove (to make soft movement) float acceleration; //!< the acceleration of the TurbineHover. float airFriction; //!< AirFriction. float rotorSpeed; //!< the speed of the rotor. float rotorCycle; //!< The Cycle the rotor is in. float airViscosity; ParticleEmitter* burstEmitter[2]; ParticleSystem* burstSystem; }; #endif /* _TURBINE_HOVERS_H */