Orxonox  0.0.5 Codename: Arcturus
TowerDefenseField.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  * ...
24  * Co-authors:
25  * ...
26  *
27  */
28 
29 
30 
31 #ifndef _TowerDefenseField_H__
32 #define _TowerDefenseField_H__
33 
35 #include "TowerDefenseTower.h"
36  #include "TowerDefenseCenterpoint.h"
37 #include <string>
38 #include "graphics/Model.h"
40 
41 namespace orxonox
42 {
44  {
45  FREE,
46  STREET,
47  START,
48  END,
49  OBSTACLE,
50  TOWER
51  };
52 
59  {
60  public:
61  TowerDefenseField(Context* context);
62  virtual ~TowerDefenseField() {}
63  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
64  const bool isFree() const
65  { return type_==TowerDefenseFieldType::FREE; }
66  virtual void create(char object, char param);
67  virtual void setCenterpoint(TowerDefenseCenterpoint* center);
68  virtual void upgrade();
69  virtual int getUpgrade();
70  virtual TowerDefenseFieldType getType();
71  virtual void setUpgrade(int upgrade);
72  virtual bool canUpgrade();
73  virtual void createFree(int orientation);
74  virtual void createStart(int orientation);
75  virtual void createEnd(int orientation);
76  virtual void createStraight(int orientation);
77  virtual void createLCurve(int orientation);
78  virtual void createRCurve(int orientation);
79  virtual void createObstacle(int orientation);
80  virtual void createTower(int upgrade);
81  virtual int getAngle();
82  private:
83  virtual void setAngle(int newAngle);
84  virtual void destroyTower();
85  int angle_;
91  int upgrade_;
92 
93  };
94 }
95 
96 #endif /* _TowerDefenseField_H__ */
TowerDefenseTower * tower_
Definition: TowerDefenseField.h:89
TowerDefenseCenterpoint * center_
Definition: TowerDefenseField.h:90
Definition of Model Class.
Shared library macros, enums, constants and forward declarations for the TowerDefense module ...
int angle_
Definition: TowerDefenseField.h:85
See TowerDefenseTowerDefenseReadme.txt for Information.
Definition: TowerDefenseTower.h:25
virtual ~TowerDefenseField()
Definition: TowerDefenseField.h:62
Definition: MovableEntity.h:42
TowerDefenseFieldType
Definition: TowerDefenseField.h:43
See TowerDefenseReadme.txt for Information.
Definition: TowerDefenseField.h:58
const bool isFree() const
Definition: TowerDefenseField.h:64
float getAngle(const orxonox::Vector3 &myposition, const orxonox::Vector3 &mydirection, const orxonox::Vector3 &otherposition)
Gets the angle between my viewing direction and the direction to the position of the other object...
Definition: Math.cc:98
int upgrade_
Definition: TowerDefenseField.h:91
xmlelement
Definition: Super.h:519
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Mode
Definition: CorePrereqs.h:102
Definition: Context.h:45
TowerDefenseFieldType type_
Definition: TowerDefenseField.h:86
#define _TowerDefenseExport
Definition: TowerDefensePrereqs.h:58
Definition: Model.h:46
Model * modelObject_
Definition: TowerDefenseField.h:88
Model * modelGround_
Definition: TowerDefenseField.h:87
See TowerDefenseReadme.txt for Information.
Definition: TowerDefenseCenterpoint.h:47