Orxonox  0.0.5 Codename: Arcturus
OrxyRoad.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  * Sebastian Hirsch
24  * Robin Jacobs
25  * Co-authors:
26  *
27  */
28 
35 #ifndef _OrxyRoad_H__
36 #define _OrxyRoad_H__
37 
38 #include "OrxyRoadPrereqs.h"
39 
40 #include "OrxyRoadCenterPoint.h" // Necessary for WeakPointer??
41 //#include "OrxyRoadShip.h" DO NOT include in Header. Will cause forward declaration issues
42 
43 //#include "OrxyRoadHUDinfo.h"
44 
45 
46 #include "core/EventIncludes.h"
47 #include "core/command/Executor.h"
49 
50 #include "gamestates/GSLevel.h"
51 #include "chat/ChatManager.h"
52 #include <vector>
53 
54 // ! HACK
55 #include "infos/PlayerInfo.h"
56 
58 
59 #include "gametypes/Deathmatch.h"
60 #include "tools/Timer.h"
61 
62 namespace orxonox
63 {
64 
66  {
67  public:
68  OrxyRoad(Context* context);
69 
70  virtual void start() override;
71  virtual void end() override;
72 
73  virtual void tick(float dt) override;
74 
75  virtual void playerPreSpawn(PlayerInfo* player) override;
76 
77  void levelUp();
78 
79  int getLives(){return this->lives;}
80  int getLevel(){return this->level;}
81  int getPoints(){return this->point;}
82  int getMultiplier(){return this->multiplier;}
83 
85  { this->center_ = center; }
86  virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
87 
88  // checks if multiplier should be reset.
89  void comboControll();
90  void costLife();
91 
92  bool bEndGame;
93  bool bShowLevel;
94  int lives;
96  float counter;
97  int pattern;
99  float lastPosition;
100 
101  private:
103 
104  OrxyRoadShip* getPlayer();
106  std::vector<OrxyRoadCube*> cubeList;
107  void toggleShowLevel(){bShowLevel = !bShowLevel;}
108  void addPoints(int numPoints);
109 
111  int level;
112  int point;
113  bool b_combo;
114 
118 
119 
120  int generateStreet(int type, OrxyRoadShip* player);
122  //int trafficVelocities[4];
123  //int numObjects[4];
124  //int streetSize[4];
125 
126 
127  /*
128 
129  //void spawnEnemy();
130 
131 
132 
133 
134 
135 
136 
137 
138 
139 
140 
141 
142  private:
143 
144 
145 
146 
147  //Context* context;
148  */
149  };
150 }
151 
152 #endif /* _OrxyRoad_H__ */
bool b_combo
Definition: OrxyRoad.h:113
int pattern
Definition: OrxyRoad.h:97
int getMultiplier()
Definition: OrxyRoad.h:82
#define _OrxyRoadExport
Definition: OrxyRoadPrereqs.h:60
int lives
Definition: OrxyRoad.h:94
Timer endGameTimer
Definition: OrxyRoad.h:102
int getPoints()
Definition: OrxyRoad.h:81
float lastPosition
Definition: OrxyRoad.h:99
Shared library macros, enums, constants and forward declarations for the OrxyRoad module ...
WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted.
Definition: CorePrereqs.h:236
WeakPtr< PlayerInfo > playerInfo_
Definition: OrxyRoad.h:105
std::vector< OrxyRoadCube * > cubeList
Definition: OrxyRoad.h:106
bool bEndGame
Definition: OrxyRoad.h:92
Definition: OrxyRoadCenterPoint.h:47
WeakPtr< OrxyRoadCenterPoint > center_
Definition: OrxyRoad.h:110
Declaration of the Timer class, used to call functions after a given time-interval.
int point
Definition: OrxyRoad.h:112
Declaration of the orxonox::Executor class and the createExecutor() functions.
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
int getLevel()
Definition: OrxyRoad.h:80
Declaration of the orxonox::ConsoleCommand class.
int multiplier
Definition: OrxyRoad.h:95
Definition: OrxyRoad.h:65
bool bShowLevel
Definition: OrxyRoad.h:93
Definition: Context.h:45
Declaration of the OrxyRoadCenterPoint class.
Timer showLevelTimer
Definition: OrxyRoad.h:117
Timer enemySpawnTimer
Definition: OrxyRoad.h:115
int getLives()
Definition: OrxyRoad.h:79
Definition: Deathmatch.h:37
Timer comboTimer
Definition: OrxyRoad.h:116
float currentPosition
Definition: OrxyRoad.h:98
Definition: PlayerInfo.h:39
void toggleShowLevel()
Definition: OrxyRoad.h:107
virtual void addBots(unsigned int amount) override
Definition: OrxyRoad.h:86
Timer is a helper class that executes a function after a given amount of seconds in game-time...
Definition: Timer.h:105
float counter
Definition: OrxyRoad.h:96
Definition of the XMLPortEventState() macro, as well as some more useful macros.
Definition of macros and functions for config-values.
void setCenterpoint(OrxyRoadCenterPoint *center)
Definition: OrxyRoad.h:84
int roadWidth
Definition: OrxyRoad.h:121
Definition: OrxyRoadShip.h:49
int level
Definition: OrxyRoad.h:111