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