source:
orxonox.OLD/trunk/src/world_entities/weapons/aim.h
@
5583
Last change on this file since 5583 was 5557, checked in by bensch, 19 years ago | |
---|---|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[4779] | 1 | /*! |
[5556] | 2 | * @file aim.h |
3 | * Definition of | |
4 | */ | |
[3329] | 5 | |
[5556] | 6 | #ifndef _AIM_H |
7 | #define _AIM_H | |
[1853] | 8 | |
[4849] | 9 | #include "p_node.h" |
10 | #include "element_2d.h" | |
[5557] | 11 | |
[5405] | 12 | // FORWARD DECLARATION |
[4830] | 13 | class Model; |
14 | class Material; | |
[4832] | 15 | class TiXmlElement; |
[3543] | 16 | |
[5556] | 17 | //! An Aim for zooming in on Targets. |
18 | class Aim : public PNode, public Element2D { | |
[2036] | 19 | |
[1904] | 20 | public: |
[5556] | 21 | Aim(const TiXmlElement* root = NULL); |
22 | virtual ~Aim(); | |
[1853] | 23 | |
[4832] | 24 | void init(); |
25 | void loadParams(const TiXmlElement* root); | |
[3245] | 26 | |
[5557] | 27 | inline void selectTarget(PNode* target) { this->setParent(target); }; |
28 | inline PNode* getTarget(PNode* target) { return this->getParent(); }; | |
29 | ||
30 | ||
[4832] | 31 | void setSize(float size); |
32 | void setTexture(const char* textureFile); | |
33 | /** @param rotationSpeed the speed at what the crosshair should rotate */ | |
[5557] | 34 | inline void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; }; |
[4832] | 35 | |
[4849] | 36 | virtual void tick(float dt); |
37 | virtual void draw() const; | |
[4779] | 38 | |
[3245] | 39 | private: |
[4830] | 40 | Material* material; //!< a material for the Aim. |
[4832] | 41 | float rotationSpeed; //!< Speed of the Rotation. |
[1853] | 42 | }; |
43 | ||
[5556] | 44 | #endif /* _AIM_H */ |
Note: See TracBrowser
for help on using the repository browser.