/* $Id: bonusfuel.hpp,v 1.3 2005/10/05 14:46:44 chfreund Exp $ */ #ifndef _BONUSFUEL_HPP_ #define _BONUSFUEL_HPP_ /**********************************************************/ #include "bonus.hpp" /**********************************************************/ //! bonus, carrying fuel for the jet pack class BonusFuel : public Bonus { public: BonusFuel( World* wp ); ~BonusFuel(); //! reimplemented from base class Object Sint32 getID() const { return BONUS_FUEL; } //! reimplemented from base class Bonus bool isWeapon() const { return false; } //! \name functions for the interaction with avatars //@{ //! fuel can only be picked up, if the avatar needs them bool canBePickedUpByAvatar( const Avatar* const avatar ); //! applies the bonus to the passed avatar void apply( Avatar *const avatar ); //! bool mustBePutIntoPack() const { return false; } //@} //! \name specific for fuel tank //@{ //! returns the fuel content of the bonus Sint32 getFuel() const { return m_fuelContent; } //@} //! \name (de)serialization //@{ virtual Uint32 getSerializeBufferSize() const; virtual void serialize( Uint8*& bufferPointer ) const; virtual void deserialize( Uint8*& bufferPointer ); //@} protected: Sint32 m_fuelContent; // fuel in the tank }; /**********************************************************/ #endif // _BONUSHEALTH_HPP_