[668] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
[1056] | 3 | * > www.orxonox.net < |
---|
[668] | 4 | * |
---|
| 5 | * |
---|
| 6 | * License notice: |
---|
| 7 | * |
---|
| 8 | * This program is free software: you can redistribute it and/or modify |
---|
| 9 | * it under the terms of the GNU General Public License as published by |
---|
| 10 | * the Free Software Foundation, either version 3 of the License, or |
---|
| 11 | * (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, see <http://www.gnu.org/licenses/>. |
---|
| 20 | * |
---|
| 21 | * |
---|
| 22 | * Author: |
---|
| 23 | * Reto Grieder |
---|
| 24 | * Co-authors: |
---|
| 25 | * ... |
---|
| 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | |
---|
[673] | 30 | #ifndef _AmmunitionDump_H__ |
---|
| 31 | #define _AmmunitionDump_H__ |
---|
[668] | 32 | |
---|
[1039] | 33 | #include "OrxonoxPrereqs.h" |
---|
| 34 | |
---|
[715] | 35 | #include <string> |
---|
| 36 | |
---|
[668] | 37 | #include <OgrePrerequisites.h> |
---|
| 38 | |
---|
| 39 | #include "network/Synchronisable.h" |
---|
[774] | 40 | #include "core/BaseObject.h" |
---|
[668] | 41 | |
---|
| 42 | |
---|
| 43 | namespace orxonox { |
---|
[729] | 44 | class _OrxonoxExport AmmunitionDump : public BaseObject, public network::Synchronisable |
---|
[668] | 45 | { |
---|
| 46 | public: |
---|
| 47 | AmmunitionDump(); |
---|
| 48 | ~AmmunitionDump(); |
---|
| 49 | |
---|
[715] | 50 | void setDumpSize(const std::string &name, int size); |
---|
[668] | 51 | |
---|
[715] | 52 | int store(const std::string &name, int quantiy); |
---|
[668] | 53 | |
---|
[715] | 54 | int getAmmunition(const std::string &name, int quantity); |
---|
[668] | 55 | |
---|
[715] | 56 | int getStockSize(const std::string &name); |
---|
[668] | 57 | |
---|
| 58 | virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); }; |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | protected: |
---|
| 62 | inline bool create() { return true; } |
---|
[1021] | 63 | void registerAllVariables(); |
---|
[668] | 64 | |
---|
| 65 | int numberOfAmmos_; |
---|
| 66 | int *stock_; |
---|
| 67 | int *capacity_; |
---|
| 68 | }; |
---|
| 69 | } |
---|
| 70 | |
---|
[673] | 71 | #endif /* _AmmunitionDump_H__ */ |
---|