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