/* $Id: staticgun_i.hpp,v 1.9 2005/10/05 14:46:45 chfreund Exp $ */ #ifndef _STATICGUN_I_HPP_ #define _STATICGUN_I_HPP_ /**********************************************************/ #include "constants.hpp" #include "stationarygun.hpp" #include "noncollidableobject.hpp" /**********************************************************/ //! a special stationary gun class StaticGunI : public StationaryGun { public: StaticGunI( World* wp ); virtual ~StaticGunI(); //! returns object ID (pure virtual in class Object) virtual Sint32 getID() const { return STATIC_GUN_I; } //! virtual void updateSpriteSelection(); /*! \brief returns a pointer to the locked area of this object * (reimplemented: Object::getLockedArea) */ virtual const AreaItem *getLockedArea () const { return &m_lockedArea; } ////////////////////////////////////////// //! \name methods concerned with the pilot's entering or leaving //@{ virtual void registerPilot( Avatar *const avatar ); //@} /*! returns the ID of the chassis connected with this gun * (reimplemented: StationaryGun::getChassisID) */ virtual Sint32 getChassisID() const { return STATIC_GUN_I_CHASSIS; } //////////////////////////////////////////////////// //! \name (de)serialization //@{ virtual Uint32 getSerializeBufferSize() const; virtual void serialize( Uint8*& bufferPointer ) const; virtual void deserialize( Uint8*& bufferPointer ); //@} protected: //! reimplemented: StationaryGun::getCheckPoint virtual const IntVector& getCheckPoint() const { return m_checkPoint; } ////////////////////////////////////////// //! \name usage, shooting, aiming angle ... //!@{ //! one shot (reimplemented: StationaryGun::doShot) virtual void doShot(); //!@} //! relative check point for avatar in gun static const IntVector m_checkPoint; //! for map stuff lockec area around the gun static const AreaItem m_lockedArea; Sint32 m_barrelTimer; }; /**********************************************************/ class StaticGunIChassis : public NonCollidableObject { public: StaticGunIChassis() { setDrawBeforeCollidableObjects( false ); } ~StaticGunIChassis() {}; //! returns object ID (pure virtual in class Object) virtual Sint32 getID() const { return STATIC_GUN_I_CHASSIS; } //! does nothing in this class virtual void update() {} }; /**********************************************************/ #endif // _STATICGUN_I_HPP_