- Timestamp:
- Feb 14, 2009, 10:17:35 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h
r2098 r2662 31 31 32 32 #include "OrxonoxPrereqs.h" 33 33 #include "objects/pickup/ShipEquipment.h" 34 34 #include "objects/worldentities/ControllableEntity.h" 35 #include "objects/RadarViewable.h" 36 #include "objects/weaponSystem/WeaponSystem.h" 35 37 36 38 namespace orxonox 37 39 { 38 class _OrxonoxExport Pawn : public ControllableEntity 40 class _OrxonoxExport Pawn : public ControllableEntity, public RadarViewable 39 41 { 40 42 public: … … 54 56 inline void removeHealth(float health) 55 57 { this->setHealth(this->health_ - health); } 56 inline float getHeal ht() const58 inline float getHealth() const 57 59 { return this->health_; } 58 60 … … 74 76 virtual void kill(); 75 77 76 virtual void fire(); 77 78 virtual void fire(WeaponMode::Enum fireMode); 78 79 virtual void postSpawn(); 79 80 81 void setWeaponSlot(WeaponSlot * wSlot); 82 WeaponSlot * getWeaponSlot(unsigned int index) const; 83 void setWeaponPack(WeaponPack * wPack); 84 WeaponPack * getWeaponPack(unsigned int firemode) const; 85 void setWeaponSet(WeaponSet * wSet); 86 WeaponSet * getWeaponSet(unsigned int index) const; 87 88 inline const WorldEntity* getWorldEntity() const 89 { return const_cast<Pawn*>(this); } 90 91 inline void setSpawnParticleSource(const std::string& source) 92 { this->spawnparticlesource_ = source; } 93 inline const std::string& getSpawnParticleSource() const 94 { return this->spawnparticlesource_; } 95 96 inline void setSpawnParticleDuration(float duration) 97 { this->spawnparticleduration_ = duration; } 98 inline float getSpawnParticleDuration() const 99 { return this->spawnparticleduration_; } 100 101 inline void setExplosionChunks(unsigned int chunks) 102 { this->numexplosionchunks_ = chunks; } 103 inline unsigned int getExplosionChunks() const 104 { return this->numexplosionchunks_; } 105 106 inline ShipEquipment& getPickUp() 107 {return this->pickUp;} 108 109 virtual void dropItems(); 110 80 111 protected: 81 virtual void spawn();82 112 virtual void death(); 113 virtual void deatheffect(); 114 virtual void spawneffect(); 83 115 116 ShipEquipment pickUp; 84 117 bool bAlive_; 118 85 119 86 120 float health_; … … 91 125 92 126 WeaponSystem* weaponSystem_; 127 unsigned int fire_; 128 unsigned int firehack_; 129 130 std::string spawnparticlesource_; 131 float spawnparticleduration_; 132 unsigned int numexplosionchunks_; 133 }; 134 135 class _OrxonoxExport PawnListener : virtual public OrxonoxClass 136 { 137 friend class Pawn; 138 139 public: 140 PawnListener(); 141 virtual ~PawnListener() {} 142 143 protected: 144 virtual void destroyedPawn(Pawn* pawn) = 0; 93 145 }; 94 146 }
Note: See TracChangeset
for help on using the changeset viewer.