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

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CUpgrade
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    CActor
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #ifndef _INCLUDE_UPGRADE_H
  16. #define _INCLUDE_UPGRADE_H
  17.  
  18. #include "actor.h"
  19. #include "weapon.h"
  20.  
  21. //-------------------------------------------------------------
  22.  
  23. const int UPGRADE_MAP_HIT = 10;            // energy lost if upgrade hits map
  24.  
  25. //-------------------------------------------------------------
  26.  
  27. class CUpgrade : public CActor
  28. {
  29.     protected:
  30.         gsCVector m_offset;
  31.  
  32.         CWeapon *m_weapon;
  33.         WeaponType m_weapon_type;
  34.  
  35.     public:
  36.         CUpgrade();
  37.         virtual ~CUpgrade();
  38.  
  39.         virtual bool activate();
  40.         virtual void kill();
  41.  
  42.         void setOffset(const gsCVector& offset);
  43.         void setWeapon(WeaponType type,WeaponGrade grade = WEAPON_STANDARD);
  44.  
  45.         CWeapon *getWeapon();
  46.         WeaponType getWeaponType();
  47.  
  48.         bool upgradeWeapon();
  49.  
  50.         void registerHit(int energy,CActor *hitter);
  51.         void onCollisionWithActor(CActor *actor);
  52.         void onCollisionWithMap(gsCMap *map,int hits);
  53. };
  54.  
  55. //-------------------------------------------------------------
  56.  
  57. #endif
  58.