MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / AnimationComponent

Class AnimationComponent

src/components/AnimationComponent.h:12–37  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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
12class AnimationComponent
13{
14public:
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
25private:
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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected