home *** CD-ROM | disk | FTP | other *** search
- #ifndef ANIMATION2D_H
- #define ANIMATION2D_H
- #include "Object2D.h"
- class Sequences;
- class String;
- class Scene2D;
-
- class Animation2D : public Object2D
- {
- public:
- Animation2D(Scene2D * scene, int layer, const String & name);
- virtual ~Animation2D();
-
- virtual void render();
-
- void start(unsigned seq, bool is_loop);
- bool life_cycle(unsigned delta_time_ms);
- bool is_finished()const;
- void set_transparency(unsigned alpha);
-
- void render_frame(unsigned seq, unsigned fr, int alpha)const;
-
- unsigned get_height()const;
- unsigned get_height(unsigned seq, unsigned fr)const;
- unsigned get_width()const;
- unsigned get_width(unsigned seq, unsigned fr )const;
- unsigned get_sequence_count()const;
- unsigned get_frame_count(unsigned seq)const;
- private:
- unsigned alpha;
- unsigned current_seq;
- unsigned current_fr;
- unsigned time_ms;
- bool loop_current;
- bool finished;
- const Sequences * sequences;
- };
- #endif //ANIMATION2D_H