home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 May / Game.EXE_05_2002.iso / Alawar / Lib / 2D / Animation2D.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-04-03  |  894 b   |  42 lines

  1. #ifndef ANIMATION2D_H
  2. #define ANIMATION2D_H
  3. #include "Object2D.h"
  4. class Sequences;
  5. class String;
  6. class Scene2D;
  7.  
  8. class Animation2D : public Object2D
  9. {
  10. public:
  11.     Animation2D(Scene2D * scene, int layer, const String & name);
  12.     virtual ~Animation2D();
  13.  
  14.     virtual void render();
  15.  
  16.     void start(int seq, bool is_loop);
  17.     bool life_cycle(float delta_time);
  18.     bool is_finished()const;
  19.     void set_transparency(int alpha);
  20.  
  21.     void render_frame(int seq, int fr, int alpha)const;
  22.  
  23.     int get_height()const;
  24.     int get_height(int seq, int fr)const;
  25.     int get_width()const;
  26.     int get_width(int seq, int fr )const;
  27.     int get_sequence_count()const;
  28.     int get_frame_count(int seq)const;
  29. private:
  30.     int alpha;
  31.     int current_seq;
  32.     int current_fr;
  33.     float time;
  34.     bool loop_current;
  35.     bool finished;
  36.  
  37.     /**
  38.      * @supplierCardinality 1 
  39.      */
  40.     const Sequences * sequences;
  41. };
  42. #endif //ANIMATION2D_H