Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pickup3/src/modules/pickup/items/TestPickup.h @ 6512

Last change on this file since 6512 was 6512, checked in by dafrick, 15 years ago

Added additional pickup (TestPickup), and did some bug $fixing.

File size: 2.6 KB
Line 
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 _TestPickup_H__
30#define _TestPickup_H__
31
32#include "pickup/PickupPrereqs.h"
33
34#include "pickup/Pickup.h"
35
36namespace orxonox {
37
38    namespace pickupTestType
39    {
40        enum Value
41        {
42            none,
43            use,
44            drop
45        };
46    }
47   
48    class _PickupExport TestPickup : public Pickup
49    {
50        friend class PickupCarrier;
51       
52        public:
53            TestPickup(BaseObject* creator);
54            virtual ~TestPickup();
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 pickupTestType::Value getTestTypeDirect(void)
62                { return this->testType_; }
63            const std::string& getTestType(void);
64           
65        protected:
66            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
67           
68            inline void setTestTypeDirect(pickupTestType::Value type)
69                { this->testType_ =  type; }
70            void setTestType(const std::string& type);
71           
72        private:
73            void initialize(void); //!< Initializes the member variables.
74           
75            pickupTestType::Value testType_;
76            static const std::string testTypeNone_s;
77            static const std::string testTypeUse_s;
78            static const std::string testTypeDrop_s;
79           
80       
81    };
82
83}
84
85#endif // _TestPickup_H__
Note: See TracBrowser for help on using the repository browser.