Rev | Line | |
---|
[10453] | 1 | #ifndef _SCROLLING_SCREEN_H |
---|
| 2 | #define _SCROLLING_SCREEN_H |
---|
| 3 | |
---|
| 4 | #include "world_entity.h" |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | class TiXmlElement; |
---|
| 8 | class Material; |
---|
| 9 | |
---|
| 10 | class ScrollingScreen : public WorldEntity |
---|
| 11 | { |
---|
| 12 | ObjectListDeclaration(ScrollingScreen); |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | public: |
---|
| 17 | ScrollingScreen(); |
---|
| 18 | ScrollingScreen(const TiXmlElement* root); |
---|
| 19 | virtual ~ScrollingScreen(); |
---|
| 20 | |
---|
| 21 | void init(); |
---|
| 22 | virtual void loadParams(const TiXmlElement* root); |
---|
| 23 | |
---|
| 24 | void fadeIn(float speed); |
---|
| 25 | void fadeOut(float speed); |
---|
| 26 | |
---|
[10455] | 27 | void setTexture(const std::string& texture); |
---|
| 28 | |
---|
[10453] | 29 | void setSpeed(float speed) { this->scrollingSpeed = speed; } |
---|
| 30 | void setViewHeight(float height) { this->viewHeight = height; } |
---|
| 31 | void setSize(float xSize, float ySize) { this->xSize = xSize; this->ySize = ySize; } |
---|
| 32 | |
---|
| 33 | virtual void tick (float time); |
---|
| 34 | |
---|
| 35 | virtual void draw() const; |
---|
| 36 | |
---|
| 37 | private: |
---|
| 38 | Material* material; |
---|
| 39 | bool isTransparent; |
---|
| 40 | float transparency; |
---|
| 41 | float fadeingSpeed; |
---|
| 42 | |
---|
| 43 | float scrollingSpeed; |
---|
| 44 | float viewHeight; |
---|
| 45 | |
---|
| 46 | float xSize; |
---|
| 47 | float ySize; |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | #endif /* _SCROLLING_SCREEN_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.