| 1 | <<<<<<< .mine |
|---|
| 2 | /* |
|---|
| 3 | * ORXONOX - the hottest 3D action shooter ever to exist |
|---|
| 4 | * > www.orxonox.net < |
|---|
| 5 | * |
|---|
| 6 | * |
|---|
| 7 | * License notice: |
|---|
| 8 | * |
|---|
| 9 | * This program is free software; you can redistribute it and/or |
|---|
| 10 | * modify it under the terms of the GNU General Public License |
|---|
| 11 | * as published by the Free Software Foundation; either version 2 |
|---|
| 12 | * of the License, or (at your option) any later version. |
|---|
| 13 | * |
|---|
| 14 | * This program is distributed in the hope that it will be useful, |
|---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | * GNU General Public License for more details. |
|---|
| 18 | * |
|---|
| 19 | * You should have received a copy of the GNU General Public License |
|---|
| 20 | * along with this program; if not, write to the Free Software |
|---|
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|---|
| 22 | * |
|---|
| 23 | * Author: |
|---|
| 24 | * Cyrill Burgener |
|---|
| 25 | * Co-authors: |
|---|
| 26 | * ... |
|---|
| 27 | * |
|---|
| 28 | */ |
|---|
| 29 | |
|---|
| 30 | /** |
|---|
| 31 | @file Hover.h |
|---|
| 32 | @brief Gametype. |
|---|
| 33 | @ingroup Hover |
|---|
| 34 | */ |
|---|
| 35 | |
|---|
| 36 | #ifndef _DodgeRace_H__ |
|---|
| 37 | #define _DodgeRace_H__ |
|---|
| 38 | |
|---|
| 39 | #include "hover/HoverPrereqs.h" |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | #include "core/EventIncludes.h" |
|---|
| 43 | #include "core/command/Executor.h" |
|---|
| 44 | #include "core/config/ConfigValueIncludes.h" |
|---|
| 45 | |
|---|
| 46 | #include "gamestates/GSLevel.h" |
|---|
| 47 | #include "chat/ChatManager.h" |
|---|
| 48 | #include <vector> |
|---|
| 49 | |
|---|
| 50 | // ! HACK |
|---|
| 51 | #include "infos/PlayerInfo.h" |
|---|
| 52 | |
|---|
| 53 | #include "core/command/ConsoleCommand.h" |
|---|
| 54 | #include "worldentities/BigExplosion.h" |
|---|
| 55 | |
|---|
| 56 | #include "gametypes/Deathmatch.h" |
|---|
| 57 | #include "tools/Timer.h" |
|---|
| 58 | |
|---|
| 59 | namespace orxonox |
|---|
| 60 | { |
|---|
| 61 | |
|---|
| 62 | class _HoverExport Hover : public Deathmatch |
|---|
| 63 | { |
|---|
| 64 | public: |
|---|
| 65 | Hover(Context* context); |
|---|
| 66 | |
|---|
| 67 | virtual void start(); |
|---|
| 68 | virtual void end(); |
|---|
| 69 | |
|---|
| 70 | virtual void tick(float dt); |
|---|
| 71 | |
|---|
| 72 | virtual void playerPreSpawn(PlayerInfo* player); |
|---|
| 73 | |
|---|
| 74 | void levelUp(); |
|---|
| 75 | |
|---|
| 76 | int getLives(){return this->lives;} |
|---|
| 77 | int getLevel(){return this->level;} |
|---|
| 78 | int getPoints(){return this->point;} |
|---|
| 79 | int getMultiplier(){return this->multiplier;} |
|---|
| 80 | |
|---|
| 81 | void setCenterpoint(DodgeRaceCenterPoint* center) |
|---|
| 82 | { this->center_ = center; } |
|---|
| 83 | virtual void addBots(unsigned int amount){} //<! overwrite function in order to bypass the addbots command |
|---|
| 84 | |
|---|
| 85 | // checks if multiplier should be reset. |
|---|
| 86 | void comboControll(); |
|---|
| 87 | void costLife(); |
|---|
| 88 | |
|---|
| 89 | bool bEndGame; |
|---|
| 90 | bool bShowLevel; |
|---|
| 91 | int lives; |
|---|
| 92 | int multiplier; |
|---|
| 93 | float counter; |
|---|
| 94 | int pattern; |
|---|
| 95 | float currentPosition; |
|---|
| 96 | float lastPosition; |
|---|
| 97 | |
|---|
| 98 | private: |
|---|
| 99 | Timer endGameTimer; |
|---|
| 100 | |
|---|
| 101 | DodgeRaceShip* getPlayer(); |
|---|
| 102 | WeakPtr<DodgeRaceShip> player; |
|---|
| 103 | std::vector<DodgeRaceCube*> cubeList; |
|---|
| 104 | void toggleShowLevel(){bShowLevel = !bShowLevel;} |
|---|
| 105 | void addPoints(int numPoints); |
|---|
| 106 | |
|---|
| 107 | WeakPtr<DodgeRaceCenterPoint> center_; |
|---|
| 108 | int level; |
|---|
| 109 | int point; |
|---|
| 110 | bool b_combo; |
|---|
| 111 | |
|---|
| 112 | Timer enemySpawnTimer; |
|---|
| 113 | Timer comboTimer; |
|---|
| 114 | Timer showLevelTimer; |
|---|
| 115 | |
|---|
| 116 | |
|---|
| 117 | /* |
|---|
| 118 | |
|---|
| 119 | //void spawnEnemy(); |
|---|
| 120 | |
|---|
| 121 | |
|---|
| 122 | |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | |
|---|
| 126 | |
|---|
| 127 | |
|---|
| 128 | |
|---|
| 129 | |
|---|
| 130 | |
|---|
| 131 | |
|---|
| 132 | private: |
|---|
| 133 | |
|---|
| 134 | |
|---|
| 135 | |
|---|
| 136 | |
|---|
| 137 | //Context* context; |
|---|
| 138 | */ |
|---|
| 139 | }; |
|---|
| 140 | } |
|---|
| 141 | |
|---|
| 142 | #endif /* _DodgeRace_H__ */ |
|---|
| 143 | ======= |
|---|
| 144 | /* |
|---|
| 145 | * ORXONOX - the hottest 3D action shooter ever to exist |
|---|
| 146 | * > www.orxonox.net < |
|---|
| 147 | * |
|---|
| 148 | * |
|---|
| 149 | * License notice: |
|---|
| 150 | * |
|---|
| 151 | * This program is free software; you can redistribute it and/or |
|---|
| 152 | * modify it under the terms of the GNU General Public License |
|---|
| 153 | * as published by the Free Software Foundation; either version 2 |
|---|
| 154 | * of the License, or (at your option) any later version. |
|---|
| 155 | * |
|---|
| 156 | * This program is distributed in the hope that it will be useful, |
|---|
| 157 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 158 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 159 | * GNU General Public License for more details. |
|---|
| 160 | * |
|---|
| 161 | * You should have received a copy of the GNU General Public License |
|---|
| 162 | * along with this program; if not, write to the Free Software |
|---|
| 163 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|---|
| 164 | * |
|---|
| 165 | * Author: |
|---|
| 166 | * Florian Zinggeler |
|---|
| 167 | * Co-authors: |
|---|
| 168 | * ... |
|---|
| 169 | * |
|---|
| 170 | */ |
|---|
| 171 | |
|---|
| 172 | /** |
|---|
| 173 | @file Hover.h |
|---|
| 174 | @brief Gametype. |
|---|
| 175 | @ingroup Hover |
|---|
| 176 | */ |
|---|
| 177 | |
|---|
| 178 | #ifndef _Hover_H__ |
|---|
| 179 | #define _Hover_H__ |
|---|
| 180 | |
|---|
| 181 | #include "Hover/HoverPrereqs.h" |
|---|
| 182 | |
|---|
| 183 | #include "HoverCenterPoint.h" // Necessary for WeakPointer?? |
|---|
| 184 | //#include "HoverShip.h" DO NOT include in Header. Will cause forward declaration issues |
|---|
| 185 | |
|---|
| 186 | //#include "HoverHUDinfo.h" |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | #include "core/EventIncludes.h" |
|---|
| 190 | #include "core/command/Executor.h" |
|---|
| 191 | #include "core/config/ConfigValueIncludes.h" |
|---|
| 192 | |
|---|
| 193 | #include "gamestates/GSLevel.h" |
|---|
| 194 | #include "chat/ChatManager.h" |
|---|
| 195 | #include <vector> |
|---|
| 196 | |
|---|
| 197 | // ! HACK |
|---|
| 198 | #include "infos/PlayerInfo.h" |
|---|
| 199 | |
|---|
| 200 | #include "core/command/ConsoleCommand.h" |
|---|
| 201 | #include "worldentities/BigExplosion.h" |
|---|
| 202 | |
|---|
| 203 | #include "gametypes/Deathmatch.h" |
|---|
| 204 | #include "tools/Timer.h" |
|---|
| 205 | |
|---|
| 206 | namespace orxonox |
|---|
| 207 | { |
|---|
| 208 | |
|---|
| 209 | class Hover : public GameType |
|---|
| 210 | { |
|---|
| 211 | public: |
|---|
| 212 | Hover(Context* context); |
|---|
| 213 | |
|---|
| 214 | virtual void start(); |
|---|
| 215 | virtual void end(); |
|---|
| 216 | |
|---|
| 217 | virtual void tick(float dt); |
|---|
| 218 | |
|---|
| 219 | void setCenterpoint(HoverCenterPoint* center) |
|---|
| 220 | { this->center_ = center; } |
|---|
| 221 | |
|---|
| 222 | |
|---|
| 223 | }; |
|---|
| 224 | } |
|---|
| 225 | |
|---|
| 226 | #endif /* _Hover_H__ */ |
|---|
| 227 | >>>>>>> .r10658 |
|---|