Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRace.h @ 10121

Last change on this file since 10121 was 10118, checked in by sriedel, 10 years ago

Working atm. including function after function.

File size: 3.1 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 "dodgerace2/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/CoreIncludes.h"
47#include "core/EventIncludes.h"
48#include "core/command/Executor.h"
49#include "core/config/ConfigValueIncludes.h"
50
51#include "gamestates/GSLevel.h"
52#include "chat/ChatManager.h"
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            void init();
72
73            virtual void start();
74            //virtual void end();
75
76            void levelUp();
77
78            int getLives(){return this->lives;}
79            int getLevel(){return this->level;}
80            int getPoints(){return this->point;}
81            int getMultiplier(){return this->multiplier;}
82
83            void setCenterpoint(DodgeRaceCenterPoint* center)
84                       { this->center_ = center; }
85
86            // checks if multiplier should be reset.
87            void comboControll();
88
89            bool bEndGame;
90            bool bShowLevel;
91            int lives;
92            int multiplier;
93
94       private:
95            WeakPtr<DodgeRaceShip> getPlayer();
96            WeakPtr<DodgeRaceShip> player;
97            void toggleShowLevel(){bShowLevel = !bShowLevel;}
98            void addPoints(int numPoints);
99
100            WeakPtr<DodgeRaceCenterPoint> center_;
101            int level;
102            int point;
103            bool b_combo;
104
105            Timer enemySpawnTimer;
106                        Timer comboTimer;
107                        Timer showLevelTimer;
108
109
110         /* virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command
111
112            //void spawnEnemy();
113
114
115
116
117
118            void costLife();
119
120
121
122
123
124
125        private:
126
127
128
129
130            //Context* context;
131            */
132    };
133}
134
135#endif /* _DodgeRace_H__ */
Note: See TracBrowser for help on using the repository browser.