Changeset 6655 in orxonox.OLD for trunk/src/world_entities/weapons/ammo_container.h
- Timestamp:
- Jan 23, 2006, 2:02:22 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/ammo_container.h
r6653 r6655 4 4 */ 5 5 6 #ifndef _ PROTO_CLASS_H7 #define _ PROTO_CLASS_H6 #ifndef _AMMO_CONTAINER_H 7 #define _AMMO_CONTAINER_H 8 8 9 9 #include "base_object.h" 10 10 11 11 12 // FORWARD DECLARATION 13 class Weapon; 14 15 #define DEFAULT_MAX_ENERGY 100 16 17 //! A class for Storing energy of Projectiles. 18 class AmmoContainer : public BaseObject { 19 20 public: 21 AmmoContainer(ClassID projectileType, float maxEnergy = DEFAULT_MAX_ENERGY); 22 virtual ~AmmoContainer(); 23 24 ClassID getProjectileType() const { return this->projectileType; }; 12 25 13 26 27 float increaseEnergy(float energy); 28 float decreaseEnergy(float energy); 14 29 15 //! A class for ... 16 class ProtoClass : public BaseObject { 30 float getMaxEnergy() const { return this->maxEnergy; }; 17 31 18 public: 19 ProtoClass(); 20 virtual ~ProtoClass(); 32 void increaseMaxEnergy(float increase); 33 34 bool weaponValid(const Weapon* weapon); 35 void fillWeapon(Weapon* weapon); 21 36 22 37 23 38 private: 39 float energy; 40 float maxEnergy; 24 41 42 ClassID projectileType; 25 43 }; 26 44 27 #endif /* _ PROTO_CLASS_H */45 #endif /* _AMMO_CONTAINER_H */
Note: See TracChangeset
for help on using the changeset viewer.