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

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    CPickup
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    06/05/00
  8. //
  9. // Base:    CActor
  10. //
  11. // Derived:    CxxxPickup
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #ifndef _INCLUDE_PICKUP_H
  16. #define _INCLUDE_PICKUP_H
  17.  
  18. #include "actor.h"
  19.  
  20. //-------------------------------------------------------------
  21.  
  22. const float CLOAK_TIME = 5.f;            // total length of cloaking
  23.  
  24. //-------------------------------------------------------------
  25.  
  26. class CPickup : public CActor
  27. {
  28.     public:
  29.         bool activate();
  30.  
  31.         bool update(Controls *controls);
  32.  
  33.         void onLeavingScreen();
  34.  
  35.         virtual void collect() = 0;
  36. };
  37.  
  38. //-------------------------------------------------------------
  39.  
  40. class CClonePickup : public CPickup
  41. {
  42.     public:
  43.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_CLONE_PICKUP]; };
  44.         void collect();
  45.         bool update(Controls *controls);
  46. };
  47.  
  48. //-------------------------------------------------------------
  49.  
  50. class CDivePickup : public CPickup
  51. {
  52.     public:
  53.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_DIVE_PICKUP]; };
  54.         void collect();
  55. };
  56.  
  57. //-------------------------------------------------------------
  58.  
  59. class CHomingMissilePickup : public CPickup
  60. {
  61.     public:
  62.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_HOMING_MISSILE_PICKUP]; };
  63.         void collect();
  64. };
  65.  
  66. //-------------------------------------------------------------
  67.  
  68. class CCloakPickup : public CPickup
  69. {
  70.     public:
  71.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_CLOAK_PICKUP]; };
  72.         void collect();
  73. };
  74.  
  75. //-------------------------------------------------------------
  76.  
  77. class CLaserPickup : public CPickup
  78. {
  79.     public:
  80.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_LASER_PICKUP]; };
  81.         void collect();
  82. };
  83.  
  84. //-------------------------------------------------------------
  85.  
  86. class CScorePickup : public CPickup
  87. {
  88.     public:
  89.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_SCORE_PICKUP]; };
  90.         void collect();
  91. };
  92.  
  93. //-------------------------------------------------------------
  94.  
  95. class CShieldPickup : public CPickup
  96. {
  97.     public:
  98.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_SHIELD_PICKUP]; };
  99.         void collect();
  100. };
  101.  
  102. //-------------------------------------------------------------
  103.  
  104. class CSpeedPickup : public CPickup
  105. {
  106.     public:
  107.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_SPEED_PICKUP]; };
  108.         void collect();
  109. };
  110.  
  111. //-------------------------------------------------------------
  112.  
  113. class CWeaponPickup : public CPickup
  114. {
  115.     public:
  116.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_WEAPON_PICKUP]; };
  117.         void collect();
  118. };
  119.  
  120. //-------------------------------------------------------------
  121.  
  122. class CWingtipPickup : public CPickup
  123. {
  124.     public:
  125.         const ActorInfo& getActorInfo() { return ActorInfoList[INFO_WINGTIP_PICKUP]; };
  126.         void collect();
  127.         bool update(Controls *controls);
  128. };
  129.  
  130. //-------------------------------------------------------------
  131.  
  132. #endif
  133.