Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/campaignHS15/src/orxonox/worldentities/Actionpoint.h @ 10863

Last change on this file since 10863 was 10863, checked in by gania, 8 years ago
File size: 3.8 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 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30    @file Attacher.h
31    @brief Definition of the Attacher class.
32    @ingroup Objects
33*/
34
35#ifndef _Actionpoint_H__
36#define _Actionpoint_H__
37
38#include "OrxonoxPrereqs.h"
39
40#include <list>
41#include <string>
42#include "core/XMLNameListener.h"
43#include "worldentities/StaticEntity.h"
44namespace orxonox
45{
46 
47    class _OrxonoxExport Actionpoint : public StaticEntity
48    {
49        public:
50            Actionpoint(Context* context);
51            virtual ~Actionpoint() {}
52
53            //----[XML data]----
54                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
55                //----[Action data]----
56                    void setActionXML( std::string val);
57                    std::string getActionXML();
58                //----[/Action data]----
59                //----[Protect data]----
60                    void setProtectXML( std::string val);
61                    std::string getProtectXML();
62                //----[/Protect data]----
63                //----[Attack data]----
64                    void setAttackXML( std::string val);
65                    std::string getAttackXML();
66                //----[/Attack data]----
67                //----[ProtectMe data]----
68                    inline void setProtectMeXML(bool c)
69                    {
70                        this->bProtectMe_ = c;
71                    }
72                    inline bool getProtectMeXML ()
73                    {
74                        return this->bProtectMe_;
75                    }
76
77                //----[/ProtectMe data]----
78
79            //----[/XML data]----
80           
81                std::string getName()
82                {
83                    if (protectName_ != "")
84                        return protectName_;
85                    else if (attackName_ != "")
86                        return attackName_;
87                    else if (bProtectMe_)
88                        return "reservedKeyword:human";
89                    else
90                        return "";
91                }
92                void setLoopStart(bool value)
93                {
94                    this->bLoopStart_ = value;
95                }
96                void setLoopEnd (bool value)
97                {
98                    this->bLoopEnd_ = value;
99                }
100            //----["Waypoints" data]----
101                void setTargetPosition(const Vector3& target);
102                Vector3 getTargetPosition ();
103            //----[/"Waypoints" data]----
104
105            bool getLoopStart()
106            {
107                return this->bLoopStart_;
108            }
109            bool getLoopEnd()
110            {
111                return this->bLoopEnd_;
112            }
113        private:
114           
115            std::string actionName_;
116            std::string protectName_;
117            std::string attackName_;
118
119
120            bool bLoopStart_;
121            bool bLoopEnd_;
122            bool bProtectMe_;
123            Vector3 targetPosition_;
124    };
125}
126
127#endif /* _Actionpoint_H__ */
Note: See TracBrowser for help on using the repository browser.