[10658] | 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 | * |
---|
[10930] | 22 | * Master of Desaster: |
---|
| 23 | * Manuel Meier |
---|
[10658] | 24 | * Co-authors: |
---|
[11036] | 25 | * Cyrill Burgener |
---|
[10658] | 26 | * |
---|
| 27 | */ |
---|
| 28 | |
---|
| 29 | /** |
---|
| 30 | @file Hover.h |
---|
[10930] | 31 | @brief Gametype. For more information see .cc file |
---|
[10658] | 32 | @ingroup Hover |
---|
| 33 | */ |
---|
| 34 | |
---|
| 35 | #ifndef _Hover_H__ |
---|
| 36 | #define _Hover_H__ |
---|
| 37 | |
---|
[10664] | 38 | #include "HoverPrereqs.h" |
---|
[11171] | 39 | #include "HoverShip.h" |
---|
[10658] | 40 | |
---|
| 41 | #include <vector> |
---|
| 42 | |
---|
[11041] | 43 | #include "gametypes/Gametype.h" |
---|
| 44 | #include "HoverOrigin.h" |
---|
[11163] | 45 | #include "pickup/PickupSpawner.h" |
---|
[10658] | 46 | |
---|
| 47 | namespace orxonox |
---|
| 48 | { |
---|
[10664] | 49 | class _HoverExport Hover : public Gametype |
---|
[10658] | 50 | { |
---|
| 51 | public: |
---|
| 52 | Hover(Context* context); |
---|
| 53 | |
---|
[11071] | 54 | virtual void tick(float dt) override; |
---|
[10658] | 55 | |
---|
[10751] | 56 | void setOrigin(HoverOrigin* origin) |
---|
[11035] | 57 | { this->origin_ = origin; } |
---|
[10658] | 58 | |
---|
[11151] | 59 | void start(); |
---|
[11177] | 60 | void newLevel(); |
---|
[11151] | 61 | void levelUp(); |
---|
| 62 | void endLevel(); |
---|
[11171] | 63 | void costLife(); |
---|
[11151] | 64 | |
---|
[11043] | 65 | inline int getNumberOfFlags() const |
---|
| 66 | { return this->numberOfFlags_; } |
---|
[10751] | 67 | |
---|
[11169] | 68 | virtual Vector3 get3dCoordinates(int x, int y, float heightOffset); |
---|
| 69 | |
---|
[11171] | 70 | inline int getTotFlags() const |
---|
| 71 | { return this->totFlags; } |
---|
| 72 | |
---|
| 73 | inline int getLives() const |
---|
| 74 | { return this->lives; } |
---|
| 75 | |
---|
[11177] | 76 | inline int getLevel() const |
---|
| 77 | { return this->level; } |
---|
| 78 | |
---|
[10835] | 79 | private: |
---|
[11171] | 80 | |
---|
[11035] | 81 | WeakPtr<HoverOrigin> origin_; |
---|
[11043] | 82 | std::vector<HoverFlag*> flags_; |
---|
| 83 | int numberOfFlags_; |
---|
[11035] | 84 | bool firstTick_; |
---|
[11151] | 85 | int level; |
---|
| 86 | int lives; |
---|
| 87 | int flagsTaken; |
---|
| 88 | |
---|
| 89 | int cellSize; |
---|
| 90 | int cellHeight; |
---|
| 91 | int numCells; |
---|
[11163] | 92 | |
---|
[11168] | 93 | int totFlags; |
---|
| 94 | |
---|
[11169] | 95 | std::vector<PickupSpawner*> pickupSpawners_; |
---|
[11182] | 96 | |
---|
[10658] | 97 | }; |
---|
| 98 | } |
---|
| 99 | |
---|
| 100 | #endif /* _Hover_H__ */ |
---|