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