Orxonox  0.0.5 Codename: Arcturus
Actionpoint.h
Go to the documentation of this file.
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  * Gani Aliguzhinov
24  * Co-authors:
25  * ...
26  *
27  */
28 
29 #ifndef _Actionpoint_H__
30 #define _Actionpoint_H__
31 
32 #include <string> //need string for XML input
33 
34 #include "core/XMLPort.h" //need XMLPort
35 #include "worldentities/StaticEntity.h" //this is a child of StaticEntity
36 
37 namespace orxonox
38 {
95  {
96  public:
97  Actionpoint(Context* context);
98  virtual ~Actionpoint() = default;
99 
100  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
101 
104  { this->actionName_ = getUppercase (val); }
106  { return this->actionName_; }
107 
110  { this->name_ = val; }
112  { return this->name_; }
113 
116  { this->name_ = val; }
118  { return this->name_; }
119 
121  void setProtectMeXML(bool c)
122  { this->bProtectMe_ = c; }
123  bool getProtectMeXML() const
124  { return this->bProtectMe_; }
125 
127  void setLoopStart(bool value)
128  { this->bLoopStart_ = value; }
129  bool getLoopStart() const
130  { return this->bLoopStart_; }
132  void setLoopEnd (bool value)
133  { this->bLoopEnd_ = value; }
134  bool getLoopEnd() const
135  { return this->bLoopEnd_; }
136 
137  std::string getName() const;
138 
139  private:
141 
145 
147  bool bLoopStart_;
148 
151  bool bLoopEnd_;
152 
154  bool bProtectMe_;
155  };
158 }
159 
160 #endif /* _Actionpoint_H__ */
std::string getActionXML() const
Definition: Actionpoint.h:105
bool bLoopEnd_
if true, this is the last element of a loop started by loopStart=true argument
Definition: Actionpoint.h:151
The StaticEntity is the simplest derivative of the orxonox::WorldEntity class.
Definition: StaticEntity.h:50
bool getProtectMeXML() const
Definition: Actionpoint.h:123
::std::string string
Definition: gtest-port.h:756
void setActionXML(std::string val)
Decides what AI will do.
Definition: Actionpoint.h:103
Declaration of the XMLPort helper classes and macros.
std::string getProtectXML() const
Definition: Actionpoint.h:111
void setProtectMeXML(bool c)
Makes AI follow human player.
Definition: Actionpoint.h:121
bool getLoopStart() const
Definition: Actionpoint.h:129
bool bLoopStart_
if true, this and all following Actionpoints until the first Actionpoint with bLoopEnd_ set to true a...
Definition: Actionpoint.h:147
xmlelement
Definition: Super.h:519
Actionpoints are used by ActionpointController and all derived classes.
Definition: Actionpoint.h:94
void setAttackXML(std::string val)
Makes AI attack an entity.
Definition: Actionpoint.h:115
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
std::string name_
name of the ship that is to be attacked or protected.
Definition: Actionpoint.h:144
Mode
Definition: CorePrereqs.h:102
Definition: Context.h:45
std::string actionName_
can be set to "FLY", "ATTACK", "PROTECT", "FIGHT", "FIGHTALL" or "NONE".
Definition: Actionpoint.h:140
#define _OrxonoxExport
Definition: OrxonoxPrereqs.h:60
void setLoopStart(bool value)
Starts a loop of Actionpoints.
Definition: Actionpoint.h:127
bool bProtectMe_
if player is to be protected, instead of passing name, one has to set protectMe to true...
Definition: Actionpoint.h:154
void setLoopEnd(bool value)
Ends a loop of Actionpoints.
Definition: Actionpoint.h:132
bool getLoopEnd() const
Definition: Actionpoint.h:134
std::string getUppercase(const std::string &str)
Returns a copy of the given string where all chars are converted to uppercase.
Definition: StringUtils.cc:356
std::string getAttackXML() const
Definition: Actionpoint.h:117
internal::String name_
Definition: gtest.cc:2289
void setProtectXML(std::string val)
Makes AI follow an entity.
Definition: Actionpoint.h:109