/* $Id: mine.hpp,v 1.6.4.1 2006/01/20 11:33:52 chfreund Exp $ */ #ifndef _MINE_HPP_ #define _MINE_HPP_ /**********************************************************/ #include #include "global.hpp" #include "constants.hpp" #include "collidableobject.hpp" #include "audio.hpp" #include "vector.hpp" #include "counter.hpp" /**********************************************************/ class Mine : public CollidableObject { friend class WeaponMine; public: Mine(); bool initialize( const Vector& pos, const Vector& vel, const Uint8 owner, const real deadTime, const Sint32 nShrapnels, const Sint32 damage ); virtual Sint32 getID() const { return MINE; } virtual void update(); virtual bool collidedWithObstacle( const Sint32 colX, const Sint32 colY ); virtual void explode( void ); virtual int applyDamage( const Particles::ParticleData& p ); virtual void serialize( Uint8*& bufferPointer ) const; virtual void deserialize( Uint8*& bufferPointer ); virtual Uint32 getSerializeBufferSize() const; virtual void dump( std::ostream& out ) const; protected: Uint8 m_owner; Counter m_deadTime; Counter m_jumpTimer; bool m_triggered; Sint32 m_nShrapnels; Sint32 m_damage; static Mix_Chunk *m_explodeSample, *m_bounceSample, *m_triggerSample, *m_damageSample; }; /**********************************************************/ #endif /* _MINE_HPP_ */