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
RevLine 
[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
47namespace 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();
[11192]60            void createFlags();
[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
[11192]79            bool bShowLevel;
80
[10835]81        private:
[11171]82
[11035]83            WeakPtr<HoverOrigin> origin_;
[11043]84            std::vector<HoverFlag*> flags_;
85            int numberOfFlags_;
[11035]86            bool firstTick_;
[11151]87            int level;
88            int lives;
89            int flagsTaken;
90
91            int cellSize;
92            int cellHeight;
93            int numCells;
[11163]94
[11168]95            int totFlags;
96
[11169]97            std::vector<PickupSpawner*> pickupSpawners_;
[11192]98
99            void toggleShowLevel(){bShowLevel = !bShowLevel;}
100
101            Timer showLevelTimer;
[10658]102    };
103}
104
105#endif /* _Hover_H__ */
Note: See TracBrowser for help on using the repository browser.