Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/Presentation_FS16/src/modules/hover/Hover.h @ 11479

Last change on this file since 11479 was 11199, checked in by fvultier, 8 years ago

merged branch hover

  • Property svn:eol-style set to native
File size: 2.7 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 *      Tomer Gidron
27 *
28 */
29
30/**
31    @file Hover.h
32    @brief Gametype. For more information see .cc file
33    @ingroup Hover
34*/
35
36#ifndef _Hover_H__
37#define _Hover_H__
38
39#include "HoverPrereqs.h"
40#include "HoverShip.h"
41
42#include <vector>
43
44#include "gametypes/Gametype.h"
45#include "HoverOrigin.h"
46#include "pickup/PickupSpawner.h"
47
48namespace orxonox
49{
50    class _HoverExport Hover : public Gametype
51    {
52       public:
53            Hover(Context* context);
54
55            virtual void tick(float dt) override;
56
57            void setOrigin(HoverOrigin* origin)
58                { this->origin_ = origin; }
59
60            void start();
61            void createFlags();
62            void levelUp();
63            void endLevel();
64            void costLife();
65
66            inline int getNumberOfFlags() const
67                { return this->numberOfFlags_; }
68
69            virtual Vector3 get3dCoordinates(int x, int y, float heightOffset);
70
71            inline int getTotFlags() const
72                { return this->totFlags; }
73
74            inline int getLives() const
75                { return this->lives; }
76
77            inline int getLevel() const
78                { return this->level; }
79
80            bool bLevelUpgradeHUD;
81
82        private:
83
84            WeakPtr<HoverOrigin> origin_;
85            std::vector<HoverFlag*> flags_;
86            int numberOfFlags_;
87            bool firstTick_;
88            int level;
89            int lives;
90            int flagsTaken;
91
92            int cellSize;
93            int cellHeight;
94            int numCells;
95
96            int totFlags;
97
98            std::vector<PickupSpawner*> pickupSpawners_;
99
100            void toggleShowLevel(){bLevelUpgradeHUD = !bLevelUpgradeHUD;}
101
102            Timer showLevelTimer;
103    };
104}
105
106#endif /* _Hover_H__ */
Note: See TracBrowser for help on using the repository browser.