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 | * Damian 'Mozork' Frick |
---|
24 | * Co-authors: |
---|
25 | * ... |
---|
26 | * |
---|
27 | */ |
---|
28 | |
---|
29 | #ifndef _MetaPickup_H__ |
---|
30 | #define _MetaPickup_H__ |
---|
31 | |
---|
32 | #include "pickup/PickupPrereqs.h" |
---|
33 | |
---|
34 | #include "pickup/Pickup.h" |
---|
35 | |
---|
36 | namespace orxonox { |
---|
37 | |
---|
38 | namespace pickupMetaType |
---|
39 | { |
---|
40 | enum Value |
---|
41 | { |
---|
42 | none, |
---|
43 | use, |
---|
44 | drop |
---|
45 | }; |
---|
46 | } |
---|
47 | |
---|
48 | class _PickupExport MetaPickup : public Pickup |
---|
49 | { |
---|
50 | friend class PickupCarrier; |
---|
51 | |
---|
52 | public: |
---|
53 | MetaPickup(BaseObject* creator); |
---|
54 | virtual ~MetaPickup(); |
---|
55 | |
---|
56 | virtual void XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode); //!< Method for creating a HealthPickup object through XML. |
---|
57 | |
---|
58 | virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around. |
---|
59 | virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass. |
---|
60 | |
---|
61 | inline pickupMetaType::Value getMetaTypeDirect(void) |
---|
62 | { return this->metaType_; } |
---|
63 | const std::string& getMetaType(void); |
---|
64 | |
---|
65 | protected: |
---|
66 | void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup. |
---|
67 | |
---|
68 | inline void setMetaTypeDirect(pickupMetaType::Value type) |
---|
69 | { this->metaType_ = type; } |
---|
70 | void setMetaType(const std::string& type); |
---|
71 | |
---|
72 | private: |
---|
73 | void initialize(void); //!< Initializes the member variables. |
---|
74 | |
---|
75 | pickupMetaType::Value metaType_; |
---|
76 | static const std::string metaTypeNone_s; |
---|
77 | static const std::string metaTypeUse_s; |
---|
78 | static const std::string metaTypeDrop_s; |
---|
79 | |
---|
80 | |
---|
81 | }; |
---|
82 | |
---|
83 | } |
---|
84 | |
---|
85 | #endif // _TestPickup_H__ |
---|