Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core7/src/modules/dodgerace/DodgeRace.h @ 10574

Last change on this file since 10574 was 10574, checked in by landauf, 9 years ago

removed some init() functions, integrated them directly into the constructor (and it's not necessary to call init() again when a gametype starts)

  • Property svn:eol-style set to native
File size: 3.4 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 *      Florian Zinggeler
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30    @file DodgeRace.h
31    @brief Gametype.
32    @ingroup DodgeRace
33*/
34
35#ifndef _DodgeRace_H__
36#define _DodgeRace_H__
37
38#include "dodgerace/DodgeRacePrereqs.h"
39
40#include "DodgeRaceCenterPoint.h" // Necessary for WeakPointer??
41//#include "DodgeRaceShip.h"        DO NOT include in Header. Will cause forward declaration issues
42
43//#include "DodgeRaceHUDinfo.h"
44
45
46#include "core/EventIncludes.h"
47#include "core/command/Executor.h"
48#include "core/config/ConfigValueIncludes.h"
49
50#include "gamestates/GSLevel.h"
51#include "chat/ChatManager.h"
52#include <vector>
53
54// ! HACK
55#include "infos/PlayerInfo.h"
56
57#include "core/command/ConsoleCommand.h"
58#include "worldentities/BigExplosion.h"
59
60#include "gametypes/Deathmatch.h"
61#include "tools/Timer.h"
62
63namespace orxonox
64{
65
66    class _DodgeRaceExport DodgeRace : public Deathmatch
67    {
68       public:
69            DodgeRace(Context* context);
70
71            virtual void start();
72            virtual void end();
73
74            virtual void tick(float dt);
75
76            virtual void playerPreSpawn(PlayerInfo* player);
77
78            void levelUp();
79
80            int getLives(){return this->lives;}
81            int getLevel(){return this->level;}
82            int getPoints(){return this->point;}
83            int getMultiplier(){return this->multiplier;}
84
85            void setCenterpoint(DodgeRaceCenterPoint* center)
86                       { this->center_ = center; }
87            virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command
88
89            // checks if multiplier should be reset.
90            void comboControll();
91            void costLife();
92
93            bool bEndGame;
94            bool bShowLevel;
95            int lives;
96            int multiplier;
97            float counter;
98            int pattern;
99            float currentPosition;
100            float lastPosition;
101
102       private:
103            Timer endGameTimer;
104
105            DodgeRaceShip* getPlayer();
106            WeakPtr<DodgeRaceShip> player;
107            std::vector<DodgeRaceCube*> cubeList;
108            void toggleShowLevel(){bShowLevel = !bShowLevel;}
109            void addPoints(int numPoints);
110
111            WeakPtr<DodgeRaceCenterPoint> center_;
112            int level;
113            int point;
114            bool b_combo;
115
116            Timer enemySpawnTimer;
117            Timer comboTimer;
118            Timer showLevelTimer;
119
120
121         /*
122
123            //void spawnEnemy();
124
125
126
127
128
129
130
131
132
133
134
135
136        private:
137
138
139
140
141            //Context* context;
142            */
143    };
144}
145
146#endif /* _DodgeRace_H__ */
Note: See TracBrowser for help on using the repository browser.