Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/tgidronFS16/src/modules/hover/Hover.h @ 11192

Last change on this file since 11192 was 11192, checked in by tgidron, 8 years ago

New Floor, Level HUD, Pickups work

  • Property svn:eol-style set to native
File size: 2.6 KB
Line 
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
47namespace 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 createFlags();
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            bool bShowLevel;
80
81        private:
82
83            WeakPtr<HoverOrigin> origin_;
84            std::vector<HoverFlag*> flags_;
85            int numberOfFlags_;
86            bool firstTick_;
87            int level;
88            int lives;
89            int flagsTaken;
90
91            int cellSize;
92            int cellHeight;
93            int numCells;
94
95            int totFlags;
96
97            std::vector<PickupSpawner*> pickupSpawners_;
98
99            void toggleShowLevel(){bShowLevel = !bShowLevel;}
100
101            Timer showLevelTimer;
102    };
103}
104
105#endif /* _Hover_H__ */
Note: See TracBrowser for help on using the repository browser.