/*! * @file proto_class.h * @brief Definition of ... */ #ifndef _AMMO_CONTAINER_H #define _AMMO_CONTAINER_H #include "base_object.h" // FORWARD DECLARATION class Weapon; #define DEFAULT_MAX_ENERGY 100 //! A class for Storing energy of Projectiles. class AmmoContainer : public BaseObject { public: AmmoContainer(ClassID projectileType, float maxEnergy = DEFAULT_MAX_ENERGY); virtual ~AmmoContainer(); bool operator=(ClassID projectileType) const { return (this->projectileType == projectileType); }; ClassID getProjectileType() const { return this->projectileType; }; float increaseEnergy(float energy); float decreaseEnergy(float energy); float getStoredEnergy() const { return this->energy; }; float getMaxEnergy() const { return this->maxEnergy; }; void increaseMaxEnergy(float increase); bool weaponValid(const Weapon* weapon); void fillWeapon(Weapon* weapon); private: float energy; float maxEnergy; ClassID projectileType; }; #endif /* _AMMO_CONTAINER_H */