home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / xenon / includes / laser.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-15  |  1.1 KB  |  57 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CLaser
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    07/05/00
  8. //
  9. // Base:    CBullet
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #ifndef _INCLUDE_LASER_H
  16. #define _INCLUDE_LASER_H
  17.  
  18. #include "bullet.h"
  19.  
  20. //-------------------------------------------------------------
  21.  
  22. const int LASER_MAX_LENGTH = 256;
  23.  
  24. //-------------------------------------------------------------
  25.  
  26. class CLaser : public CBullet
  27. {
  28.     private:
  29.         gsCList<CActor *> m_actor_collider_list;
  30.         gsCList<gsCPoint> m_map_collider_list;
  31.         gsCMap *m_hit_map;
  32.  
  33.         int m_length;
  34.         bool m_dying;
  35.  
  36.         gsCRandom m_random;
  37.  
  38.     public:
  39.         CLaser();
  40.         virtual ~CLaser();
  41.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_LASER]; };
  42.  
  43.         bool activate();
  44.  
  45.         gsCRect getCollisionRect();
  46.         void onCollisionWithActor(CActor *actor);
  47.         void onCollisionWithMap(gsCMap *map,int hits);
  48.         void postProcessCollision();
  49.  
  50.         bool update(Controls *controls);
  51.         bool draw();
  52. };
  53.  
  54. //-------------------------------------------------------------
  55.  
  56. #endif
  57.