2011-08-15 16:11:24 +02:00
|
|
|
#ifndef EFFECT_H
|
|
|
|
#define EFFECT_H
|
|
|
|
|
|
|
|
#include <framework/global.h>
|
|
|
|
#include "thing.h"
|
|
|
|
|
|
|
|
class Effect : public Thing
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Effect();
|
|
|
|
|
|
|
|
void draw(int x, int y);
|
2011-08-16 07:47:35 +02:00
|
|
|
void update(int elapsedTime);
|
|
|
|
|
|
|
|
bool finished() { return m_finished; }
|
2011-08-15 16:11:24 +02:00
|
|
|
|
2011-08-15 23:02:52 +02:00
|
|
|
const ThingAttributes& getAttributes();
|
|
|
|
|
2011-08-16 07:47:35 +02:00
|
|
|
EffectPtr asEffect() { return std::static_pointer_cast<Effect>(shared_from_this()); }
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_timer;
|
|
|
|
int m_animation;
|
|
|
|
bool m_finished;
|
2011-08-15 16:11:24 +02:00
|
|
|
};
|
|
|
|
|
2011-08-15 23:02:52 +02:00
|
|
|
#endif
|