Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/surfaceraceHS14/src/modules/dodgerace/DodgeRace.h @ 10248

Last change on this file since 10248 was 10236, checked in by landauf, 10 years ago

replaced tabs with spaces. no changes in code.

  • Property svn:eol-style set to native
File size: 3.5 KB
RevLine 
[10114]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
[10234]38#include "dodgerace/DodgeRacePrereqs.h"
[10114]39
[10118]40#include "DodgeRaceCenterPoint.h" // Necessary for WeakPointer??
[10236]41//#include "DodgeRaceShip.h"        DO NOT include in Header. Will cause forward declaration issues
[10118]42
[10117]43//#include "DodgeRaceHUDinfo.h"
[10114]44
[10118]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"
[10152]53#include <vector>
[10118]54
55// ! HACK
56#include "infos/PlayerInfo.h"
57
58#include "core/command/ConsoleCommand.h"
59#include "worldentities/BigExplosion.h"
60
[10114]61#include "gametypes/Deathmatch.h"
62#include "tools/Timer.h"
63
64namespace orxonox
65{
66
[10118]67    class _DodgeRaceExport DodgeRace : public Deathmatch
[10114]68    {
[10118]69       public:
[10114]70            DodgeRace(Context* context);
71
[10118]72            void init();
73
[10114]74            virtual void start();
[10124]75            virtual void end();
[10114]76
[10135]77            virtual void tick(float dt);
78
[10166]79            virtual void playerPreSpawn(PlayerInfo* player);
80
[10118]81            void levelUp();
[10114]82
83            int getLives(){return this->lives;}
84            int getLevel(){return this->level;}
85            int getPoints(){return this->point;}
86            int getMultiplier(){return this->multiplier;}
87
[10118]88            void setCenterpoint(DodgeRaceCenterPoint* center)
89                       { this->center_ = center; }
[10124]90            virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command
[10114]91
92            // checks if multiplier should be reset.
93            void comboControll();
[10124]94            void costLife();
[10118]95
96            bool bEndGame;
97            bool bShowLevel;
[10114]98            int lives;
99            int multiplier;
[10235]100            float counter;
[10152]101            int pattern;
[10235]102            float currentPosition;
103            float lastPosition;
[10118]104
105       private:
[10154]106            Timer endGameTimer;
107
[10117]108            WeakPtr<DodgeRaceShip> getPlayer();
109            WeakPtr<DodgeRaceShip> player;
[10152]110            std::vector<DodgeRaceCube*> cubeList;
[10118]111            void toggleShowLevel(){bShowLevel = !bShowLevel;}
112            void addPoints(int numPoints);
[10114]113
[10118]114            WeakPtr<DodgeRaceCenterPoint> center_;
[10114]115            int level;
116            int point;
117            bool b_combo;
[10118]118
119            Timer enemySpawnTimer;
[10236]120            Timer comboTimer;
121            Timer showLevelTimer;
[10118]122
123
[10124]124         /*
[10118]125
126            //void spawnEnemy();
127
128
129
130
131
132
133
134
135
136
137
[10124]138
[10118]139        private:
140
141
142
143
144            //Context* context;
145            */
[10114]146    };
147}
148
149#endif /* _DodgeRace_H__ */
Note: See TracBrowser for help on using the repository browser.