Line | |
---|
1 | /*! |
---|
2 | * @file blink.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef _BLINK_H |
---|
6 | #define _BLINK_H |
---|
7 | |
---|
8 | #include "world_entity.h" |
---|
9 | #include "color.h" |
---|
10 | |
---|
11 | class Material; |
---|
12 | class TiXmlElement; |
---|
13 | |
---|
14 | class Blink : public WorldEntity |
---|
15 | { |
---|
16 | ObjectListDeclaration(Blink); |
---|
17 | public: |
---|
18 | Blink(const TiXmlElement* root = NULL); |
---|
19 | virtual ~Blink(); |
---|
20 | |
---|
21 | void init(); |
---|
22 | void loadParams(const TiXmlElement* root); |
---|
23 | |
---|
24 | void setPosition(float x, float y, float z) { this->position = Vector(x, y, z); } |
---|
25 | void setSize(float s) { this->size = s; } |
---|
26 | void setOmega(float w) { this->omega = w; } |
---|
27 | void setColor(float r, float g, float b) { this->color = Vector(r, g, b); } |
---|
28 | //void setTexture(const std::string& textureFile); |
---|
29 | |
---|
30 | virtual void tick(float dt); |
---|
31 | virtual void draw() const; |
---|
32 | |
---|
33 | private: |
---|
34 | Material* material; |
---|
35 | Vector position; |
---|
36 | Vector color; |
---|
37 | float angle; |
---|
38 | float omega; |
---|
39 | float blinkStr; |
---|
40 | float size; //! only one float caus' its quadratical |
---|
41 | }; |
---|
42 | |
---|
43 | #endif /* _BLINK_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.