Line | |
---|
1 | /*! |
---|
2 | * @file aim.h |
---|
3 | * Definition of |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _AIM_H |
---|
7 | #define _AIM_H |
---|
8 | |
---|
9 | #include "p_node.h" |
---|
10 | #include "element_2d.h" |
---|
11 | // FORWARD DECLARATION |
---|
12 | class Model; |
---|
13 | class Material; |
---|
14 | class TiXmlElement; |
---|
15 | |
---|
16 | //! An Aim for zooming in on Targets. |
---|
17 | class Aim : public PNode, public Element2D { |
---|
18 | |
---|
19 | public: |
---|
20 | Aim(const TiXmlElement* root = NULL); |
---|
21 | virtual ~Aim(); |
---|
22 | |
---|
23 | void init(); |
---|
24 | void loadParams(const TiXmlElement* root); |
---|
25 | |
---|
26 | void setSize(float size); |
---|
27 | void setTexture(const char* textureFile); |
---|
28 | /** @param rotationSpeed the speed at what the crosshair should rotate */ |
---|
29 | void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; }; |
---|
30 | |
---|
31 | virtual void tick(float dt); |
---|
32 | virtual void draw() const; |
---|
33 | |
---|
34 | private: |
---|
35 | Material* material; //!< a material for the Aim. |
---|
36 | float rotationSpeed; //!< Speed of the Rotation. |
---|
37 | }; |
---|
38 | |
---|
39 | #endif /* _AIM_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.