Oodle/src/CResizeEvent.h
raw| 1 | #ifndef _CRESIZEEVENT_ |
| 2 | #define _CRESIZEEVENT_ |
| 3 | |
| 4 | #include "CSprite.h" |
| 5 | #include "CTimedEvent.h" |
| 6 | #include "SDL_rotozoom.h" |
| 7 | |
| 8 | class CResizeEvent : public CTimedEvent |
| 9 | { |
| 10 | public: |
| 11 | CResizeEvent(CSprite &s, double minScale, double maxScale, int time, bool c) : CTimedEvent(0, c), s(s), minScale(minScale), maxScale(maxScale), time(time) {} |
| 12 | CResizeEvent* getCopy() { return new CResizeEvent(*this); } |
| 13 | |
| 14 | void initialize() { CTimedEvent::initialize(); s.setScale(minScale); } |
| 15 | void doUpdate(); |
| 16 | |
| 17 | private: |
| 18 | CSprite &s; |
| 19 | double minScale; |
| 20 | double maxScale; |
| 21 | unsigned int time; |
| 22 | }; |
| 23 | |
| 24 | #endif |