[11836] | 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 | /** |
---|
[11838] | 30 | @file OrxyRoad.h |
---|
[11836] | 31 | @brief Gametype. |
---|
[11838] | 32 | @ingroup OrxyRoad |
---|
[11836] | 33 | */ |
---|
| 34 | |
---|
[11838] | 35 | #ifndef _OrxyRoad_H__ |
---|
| 36 | #define _OrxyRoad_H__ |
---|
[11836] | 37 | |
---|
[11885] | 38 | #include "OrxyRoadPrereqs.h" |
---|
[11836] | 39 | |
---|
[11838] | 40 | #include "OrxyRoadCenterPoint.h" // Necessary for WeakPointer?? |
---|
| 41 | //#include "OrxyRoadShip.h" DO NOT include in Header. Will cause forward declaration issues |
---|
[11836] | 42 | |
---|
[11838] | 43 | //#include "OrxyRoadHUDinfo.h" |
---|
[11836] | 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 | |
---|
[11899] | 59 | #include "gametypes/Deathmatch.h" |
---|
[11836] | 60 | #include "tools/Timer.h" |
---|
| 61 | |
---|
| 62 | namespace orxonox |
---|
| 63 | { |
---|
| 64 | |
---|
[11899] | 65 | class _OrxyRoadExport OrxyRoad : public Deathmatch |
---|
[11836] | 66 | { |
---|
| 67 | public: |
---|
[11838] | 68 | OrxyRoad(Context* context); |
---|
[11836] | 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 | |
---|
[11838] | 84 | void setCenterpoint(OrxyRoadCenterPoint* center) |
---|
[11836] | 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; |
---|
| 95 | int multiplier; |
---|
| 96 | float counter; |
---|
| 97 | int pattern; |
---|
| 98 | float currentPosition; |
---|
| 99 | float lastPosition; |
---|
| 100 | |
---|
| 101 | private: |
---|
| 102 | Timer endGameTimer; |
---|
| 103 | |
---|
[11838] | 104 | OrxyRoadShip* getPlayer(); |
---|
[11836] | 105 | WeakPtr<PlayerInfo> playerInfo_; |
---|
[11838] | 106 | std::vector<OrxyRoadCube*> cubeList; |
---|
[11836] | 107 | void toggleShowLevel(){bShowLevel = !bShowLevel;} |
---|
| 108 | void addPoints(int numPoints); |
---|
| 109 | |
---|
[11838] | 110 | WeakPtr<OrxyRoadCenterPoint> center_; |
---|
[11836] | 111 | int level; |
---|
| 112 | int point; |
---|
| 113 | bool b_combo; |
---|
| 114 | |
---|
| 115 | Timer enemySpawnTimer; |
---|
| 116 | Timer comboTimer; |
---|
| 117 | Timer showLevelTimer; |
---|
| 118 | |
---|
| 119 | |
---|
[11935] | 120 | int generateStreet(int type, OrxyRoadShip* player); |
---|
| 121 | int roadWidth; |
---|
| 122 | //int trafficVelocities[4]; |
---|
| 123 | //int numObjects[4]; |
---|
| 124 | //int streetSize[4]; |
---|
| 125 | |
---|
| 126 | |
---|
[11836] | 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 | |
---|
[11838] | 152 | #endif /* _OrxyRoad_H__ */ |
---|