just fyi, this is easily the worst animation system i've ever written. it was mostly written during a single lecture and it really shows in how un-thought-out it is it also hasn't been converted to use floats or vectors yet
| 10 | //it was mostly written during a single lecture and it really shows in how un-thought-out it is |
| 11 | //it also hasn't been converted to use floats or vectors yet |
| 12 | class AnimationComponent |
| 13 | { |
| 14 | public: |
| 15 | AnimationComponent(); |
| 16 | |
| 17 | void move(int x, int y, int speed); |
| 18 | void fadeIn(int time); |
| 19 | void fadeOut(int time); |
| 20 | |
| 21 | void update(int deltaTime); |
| 22 | |
| 23 | void addChild(GuiComponent* gui); |
| 24 | |
| 25 | private: |
| 26 | unsigned char mOpacity; |
| 27 | |
| 28 | std::vector<GuiComponent*> mChildren; |
| 29 | |
| 30 | void moveChildren(int offsetx, int offsety); |
| 31 | void setChildrenOpacity(unsigned char opacity); |
| 32 | |
| 33 | int mFadeRate; |
| 34 | int mMoveX, mMoveY, mMoveSpeed; |
| 35 | |
| 36 | int mAccumulator; |
| 37 | }; |
| 38 | |
| 39 | #endif |
nothing calls this directly
no outgoing calls
no test coverage detected