home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 May / Game.EXE_05_2002.iso / Alawar / src / Creature.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-04-01  |  709 b   |  34 lines

  1. #ifndef CREATURE_H
  2. #define CREATURE_H
  3.  
  4. #include "Position.h"
  5. #include <String.hpp>
  6. class Level;
  7.  
  8. class Creature
  9. {
  10. public:
  11.     explicit Creature(Level * level)
  12.         :    level( level )
  13.     {}
  14.     virtual ~Creature()
  15.     {}
  16.  
  17.     virtual void life_cycle(float delta_time) =0;
  18.     virtual String get_name()const =0;
  19.     virtual float get_size()const =0;
  20.     virtual void process_collision(const Creature * cre) =0;
  21.     virtual bool is_solid()const =0;
  22.     virtual void process_death(const Creature * cre) =0;
  23.     virtual bool is_alive()const =0;
  24.     Position get_position()const
  25.     {
  26.         return pos;
  27.     }
  28. protected:
  29.     friend class Level;
  30.     Position pos;
  31.     float speed;    //Γ Ωδσ≥ε≈Ωα⌡ Γ ±σΩ≤φΣ≤
  32.     Level * level;
  33. };
  34. #endif //CREATURE_H