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

  1. #ifndef MONSTER_H
  2. #define MONSTER_H
  3.  
  4. #include "Creature.h"
  5. #include <2D/Animation2D.h>
  6.  
  7. class Monster : public Creature
  8. {
  9. public:    
  10.     virtual void life_cycle(float delta_time);
  11.     virtual String get_name()const;
  12.     virtual float get_size()const;
  13.     virtual void process_collision(const Creature * cre);
  14.     virtual bool is_solid()const;
  15.     virtual void process_death(const Creature * cre);
  16.     virtual bool is_alive()const;
  17. private:
  18.     friend class Level;
  19.     Monster( Scene2D * scene, Level * level );
  20.  
  21.     enum state_enum { CREATING, LIVING, WEAK, DYING, DEAD };
  22.     state_enum state;
  23.     void change_state( state_enum new_state );
  24.     void change_direction( Direction dir );
  25.  
  26.     String name;
  27.     Animation2D anim;
  28.  
  29.     float weak_time;
  30.     float current_weak_time;
  31.     float eye_time;
  32.     float current_eye_time;
  33.  
  34.     Direction current_direction;
  35.  
  36.     Direction make_new_descision();
  37. };
  38.  
  39. #endif //MONSTER_H