mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-30 18:15:39 +00:00
34 lines
586 B
C++
34 lines
586 B
C++
#ifndef _ANIMATIONCOMPONENT_H_
|
|
#define _ANIMATIONCOMPONENT_H_
|
|
|
|
#include "../GuiComponent.h"
|
|
#include "ImageComponent.h"
|
|
#include <vector>
|
|
|
|
class AnimationComponent
|
|
{
|
|
public:
|
|
AnimationComponent();
|
|
|
|
void move(int x, int y, int speed);
|
|
void fadeIn(int time);
|
|
void fadeOut(int time);
|
|
|
|
void update(int deltaTime);
|
|
|
|
void addChild(ImageComponent* gui);
|
|
|
|
private:
|
|
unsigned char mOpacity;
|
|
|
|
std::vector<ImageComponent*> mChildren;
|
|
|
|
void moveChildren(int offsetx, int offsety);
|
|
void setChildrenOpacity(unsigned char opacity);
|
|
|
|
int mFadeRate;
|
|
int mMoveX, mMoveY, mMoveSpeed;
|
|
};
|
|
|
|
#endif
|