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

  1. #ifndef CREATURES_H
  2. #define CREATURES_H
  3.  
  4. #include <vector>
  5. #include "Creature.h"
  6.  
  7. /**
  8.  * @stereotype container 
  9.  */
  10. class Creatures : public std::vector<Creature *>
  11. {
  12. public:
  13.     void life_cycle( float delta_time )
  14.     {
  15.         iterator it = begin();
  16.         for( ; it != end(); ++it )
  17.             (*it)->life_cycle( delta_time );
  18.     }
  19.     void process_death( Creature * creature )
  20.     {
  21.         iterator it = begin();
  22.         for( ; it != end(); ++it )
  23.             (*it)->process_death( creature );
  24.     }
  25. private:
  26.     /** @link aggregation */
  27.     /*#  Creature lnkCreature; */
  28. };
  29. #endif //CREATURES_H