/*! * @file cpectator.h * Implements a playable for lazy people */ #ifndef _SPECTATOR_H #define _SPECTATOR_H #include "playable.h" class Spectator : public Playable { ObjectListDeclaration(Spectator); public: Spectator(const TiXmlElement* root = NULL); virtual ~Spectator(); virtual void loadParams(const TiXmlElement* root); virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f); virtual void enter(); virtual void leave(); virtual void reset(); virtual void collidesWith(WorldEntity* entity, const Vector& location); virtual void tick(float time); virtual void process(const Event &event); private: void init(); bool bLeft; bool bRight; bool bForward; bool bBackward; float xMouse; //!< mouse moved in x-Direction float yMouse; //!< mouse moved in y-Direction Quaternion mouseDir; //!< the direction where the player wants to fly float angleX; float angleY; }; #endif