Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Final Project

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