/*! * @file aim.h * Definition of */ #ifndef _AIM_H #define _AIM_H #include "p_node.h" #include "element_2d.h" // FORWARD DECLARATION class Model; class Material; class TiXmlElement; //! An Aim for zooming in on Targets. class Aim : public PNode, public Element2D { public: Aim(const TiXmlElement* root = NULL); virtual ~Aim(); void init(); void loadParams(const TiXmlElement* root); inline void selectTarget(PNode* target) { this->setParent(target); }; inline PNode* getTarget(PNode* target) { return this->getParent(); }; void setSize(float size); void setTexture(const char* textureFile); /** @param rotationSpeed the speed at what the crosshair should rotate */ inline void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; }; virtual void tick(float dt); virtual void draw() const; private: Material* material; //!< a material for the Aim. float rotationSpeed; //!< Speed of the Rotation. }; #endif /* _AIM_H */