| [2983] | 1 | /* | 
|---|
 | 2 |  *   ORXONOX - the hottest 3D action shooter ever to exist | 
|---|
 | 3 |  *                    > www.orxonox.net < | 
|---|
 | 4 |  * | 
|---|
 | 5 |  * | 
|---|
 | 6 |  *   License notice: | 
|---|
 | 7 |  * | 
|---|
 | 8 |  *   This program is free software; you can redistribute it and/or | 
|---|
 | 9 |  *   modify it under the terms of the GNU General Public License | 
|---|
 | 10 |  *   as published by the Free Software Foundation; either version 2 | 
|---|
 | 11 |  *   of the License, or (at your option) any later version. | 
|---|
 | 12 |  * | 
|---|
 | 13 |  *   This program is distributed in the hope that it will be useful, | 
|---|
 | 14 |  *   but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
 | 15 |  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
 | 16 |  *   GNU General Public License for more details. | 
|---|
 | 17 |  * | 
|---|
 | 18 |  *   You should have received a copy of the GNU General Public License | 
|---|
 | 19 |  *   along with this program; if not, write to the Free Software | 
|---|
 | 20 |  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. | 
|---|
 | 21 |  * | 
|---|
 | 22 |  *   Author: | 
|---|
 | 23 |  *      Hagen Seifert | 
|---|
 | 24 |  *   Co-authors: | 
|---|
 | 25 |  *      ... | 
|---|
 | 26 |  * | 
|---|
 | 27 |  */ | 
|---|
 | 28 |  | 
|---|
| [8855] | 29 | /** | 
|---|
 | 30 |     @file EnergyDrink.h | 
|---|
 | 31 |     @brief Definition of the EnergyDrink class. | 
|---|
 | 32 | */ | 
|---|
 | 33 |  | 
|---|
| [2983] | 34 | #ifndef _EnergyDrink_H__ | 
|---|
 | 35 | #define _EnergyDrink_H__ | 
|---|
 | 36 |  | 
|---|
| [5724] | 37 | #include "weapons/WeaponsPrereqs.h" | 
|---|
| [3196] | 38 |  | 
|---|
 | 39 | #include <string> | 
|---|
 | 40 | #include "tools/Timer.h" | 
|---|
| [5735] | 41 | #include "weaponsystem/WeaponMode.h" | 
|---|
| [2983] | 42 |  | 
|---|
 | 43 | namespace orxonox | 
|---|
 | 44 | { | 
|---|
| [8855] | 45 |  | 
|---|
 | 46 |     /** | 
|---|
 | 47 |     @brief | 
|---|
 | 48 |         Shoots a can. | 
|---|
 | 49 |     @author | 
|---|
 | 50 |         Hagen Seifert | 
|---|
 | 51 |     @ingroup WeaponsWeaponModes | 
|---|
 | 52 |     */ | 
|---|
| [5724] | 53 |     class _WeaponsExport EnergyDrink : public WeaponMode | 
|---|
| [2983] | 54 |     { | 
|---|
 | 55 |         public: | 
|---|
 | 56 |             EnergyDrink(BaseObject* creator); | 
|---|
 | 57 |             virtual ~EnergyDrink() {} | 
|---|
 | 58 |  | 
|---|
 | 59 |             virtual void fire(); | 
|---|
 | 60 |             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); | 
|---|
 | 61 |  | 
|---|
 | 62 |         private: | 
|---|
| [8855] | 63 |             /** | 
|---|
 | 64 |             @brief Set the material of the EnergyDrink. | 
|---|
 | 65 |             @param material The name of the material. | 
|---|
 | 66 |             */ | 
|---|
 | 67 |             void setMaterial(const std::string& material) | 
|---|
 | 68 |                 { this->material_ = material; } | 
|---|
 | 69 |             /** | 
|---|
 | 70 |             @brief Get the material of the EnergyDrink. | 
|---|
 | 71 |             @return Returns the material name. | 
|---|
 | 72 |             */ | 
|---|
 | 73 |             inline const std::string& getMaterial() const | 
|---|
| [3196] | 74 |                 { return this->material_; } | 
|---|
| [8855] | 75 |  | 
|---|
 | 76 |             void setDelay(float delay); | 
|---|
 | 77 |             /** | 
|---|
 | 78 |             @brief Get the firing delay. | 
|---|
 | 79 |             @return Returns the delay in seconds. | 
|---|
 | 80 |             */ | 
|---|
 | 81 |             float getDelay() const | 
|---|
 | 82 |                 { return this->delay_; } | 
|---|
 | 83 |  | 
|---|
| [2983] | 84 |             void shot(); | 
|---|
| [8855] | 85 |             void muzzleflash(); | 
|---|
| [2983] | 86 |  | 
|---|
| [8855] | 87 |             std::string material_; //!< The material. | 
|---|
 | 88 |             float speed_; //!< The speed of the EnergyDrink. | 
|---|
 | 89 |             float delay_; //!< The firing delay. | 
|---|
 | 90 |             Timer delayTimer_; //!< The timer to delay the firing. | 
|---|
| [2983] | 91 |     }; | 
|---|
 | 92 | } | 
|---|
 | 93 |  | 
|---|
 | 94 | #endif /* _EnergyDrink_H__ */ | 
|---|