/*! * @file crosshair.h * Definition of ... */ #ifndef _CROSSHAIR_H #define _CROSSHAIR_H #include "p_node.h" #include "element_2d.h" #include "event_listener.h" #include "vector.h" // FORWARD DECLARATION class Model; class Material; class TiXmlElement; //! A class that enables the class Crosshair : public PNode, public Element2D, public EventListener { ObjectListDeclaration(Crosshair); public: Crosshair(const TiXmlElement* root = NULL); virtual ~Crosshair(); void init(); virtual void loadParams(const TiXmlElement* root); void setSize(float size); void setTexture(const std::string& textureFile); /** @param rotationSpeed the speed at what the crosshair should rotate */ void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; }; virtual void process(const Event &event); virtual void tick(float dt); virtual void draw() const; private: Material* material; //!< a material for the Aim. float rotationSpeed; //!< Speed of the Rotation. }; #endif /* _CROSSHAIR_H */