Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/modularships/src/orxonox/items/PartDestructionEvent.h @ 10052

Last change on this file since 10052 was 10052, checked in by noep, 11 years ago

Added PartDestructionEvent, possibly fixed one out of two runtimeerrors

File size: 2.4 KB
RevLine 
[10052]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 *      Noe Pedrazzini
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _PartDestructionEvent_H__
30#define _PartDestructionEvent_H__
31
32#include "OrxonoxPrereqs.h"
33#include "Item.h"
34
35#include <string>
36
37
38namespace orxonox // tolua_export
39{ // tolua_export
40    class _OrxonoxExport PartDestructionEvent // tolua_export
41        : public Item
42    { // tolua_export
43
44        public:
45
46            PartDestructionEvent(Context* context);
47            virtual ~PartDestructionEvent();
48
49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
50
51            void execute();
52
53            void setTargetType(std::string type);
54            inline std::string getTargetType()
55                { return this->targetType_; }
56
57            void setTargetName(std::string name);
58            inline std::string getTargetName()
59                { return this->targetName_; }
60
61            void setTargetParam(std::string param);
62            inline std::string getTargetParam()
63                { return this->targetName_; }
64
65            void setOperation(std::string operation);
66            inline std::string getOperation()
67                { return this->operation_; }
68
69            void setEventValue(float value);
70            inline float getEventValue()
71                { return this->value_; }
72
73        protected:
74
75        private:
76
77            bool isValid_;
78
79            std::string targetType_;
80            std::string targetName_;
81            std::string targetParam_;
82            std::string operation_;
83
84            float value_;
85
86
87    }; // tolua_export
88} // tolua_export
89
90#endif /* _PartDestructionEvent_H__ */
Note: See TracBrowser for help on using the repository browser.