#ifndef _WagnisGun__ #define _WagnisGun__ #include "weapons/WeaponsPrereqs.h" #include "tools/Timer.h" #include "weaponsystem/WeaponMode.h" namespace orxonox { /** @brief Shoots laser beams. @author Hagen Seifert @ingroup WeaponsWeaponModes */ class _WeaponsExport WagnisGun : public WeaponMode { public: WagnisGun(Context* context); virtual ~WagnisGun(); virtual void fire() override; virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; protected: /** @brief Set the mesh. @param mesh The mesh name. */ void setMesh(const std::string& mesh) { this->mesh_ = mesh; } /** @brief Get the mesh. @return Returns the mesh name. */ const std::string& getMesh() const { return this->mesh_; } /** @brief Set the sound. @param sound The Sound name. */ void setSound(const std::string& sound) { this->sound_ = sound; } /** @brief Get the sound. @return Returns the sound name. */ const std::string& getSound() const { return this->sound_; } /** @brief Set the material. @param material The material name. */ void setMaterial(const std::string& material) { this->material_ = material; } /** @brief Get the material. @return Returns the material name. */ const std::string& getMaterial() const { return this->material_; } void setDelay(float delay); /** @brief Get the firing delay. @return Returns the firing delay in seconds. */ float getDelay() const { return this->delay_; } virtual void shot(); void muzzleflash(); std::string material_; //!< The material. std::string mesh_; //!< The mesh. std::string sound_; //!< The sound. float speed_; //!< The speed of the fired projectile. float delay_; //!< The firing delay. Timer delayTimer_; //!< A timer to delay the firing. }; } #endif /* _WagnisGun__ */