Orxonox  0.0.5 Codename: Arcturus
Asteroids2DCenterPoint.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  * Viviane Yang
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _Asteroids2DCenterPoint_H__
36 #define _Asteroids2DCenterPoint_H__
37 
39 
41 
42 namespace orxonox
43 {
45  {
46  public:
47  Asteroids2DCenterPoint(Context* context); //checks whether the gametype is actually Asteroids2D.
48  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
49 
53  void setFieldDimension(const Vector2& dimension)
54  { this->width_ = dimension.x; this->height_ = dimension.y; }
59  Vector2 getFieldDimension() const
60  { return Vector2(this->width_, this->height_); }
61 
62  private:
63  void checkGametype(); //checks whether the gametype actually is Asteroids2D
64  float width_, height_;
65 
66  };
67 }
68 
69 #endif /* _Asteroids2DCenterPoint_H__ */
The StaticEntity is the simplest derivative of the orxonox::WorldEntity class.
Definition: StaticEntity.h:50
Vector2 getFieldDimension() const
Get the dimensions of the playing field.
Definition: Asteroids2DCenterPoint.h:59
Definition: Asteroids2DCenterPoint.h:44
xmlelement
Definition: Super.h:519
Shared library macros, enums, constants and forward declarations for the Asteroids2D module ...
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
#define _Asteroids2DExport
Definition: Asteroids2DPrereqs.h:60
void setFieldDimension(const Vector2 &dimension)
Set the dimensions of the playing field.
Definition: Asteroids2DCenterPoint.h:53
Definition: Context.h:45
float width_
Definition: Asteroids2DCenterPoint.h:64