Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/tgidronFS16/src/modules/hover/TFlagsLivesLevelHUD.h @ 11177

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

New Pickups (speed); Level Counter and Crate spawn (not working)

File size: 3.0 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 *   Author:
23 *      Tomer Gidron
24 *
25 */
26
27 /**
28    @file TFlagsLivesLevelHUD.h
29    @brief Declaration of the TFlagsLivesLevelHUD class.
30*/
31
32#ifndef _TFlagsLivesLevelHUD_H__
33#define _TFlagsLivesLevelHUD_H__
34
35
36#include "HoverPrereqs.h"
37
38#include "tools/interfaces/Tickable.h"
39#include "overlays/OverlayText.h"
40
41namespace orxonox
42{
43    class _HoverExport TFlagsLivesLevelHUD : public OverlayText, public Tickable
44    {
45        public:
46            TFlagsLivesLevelHUD(Context* context);
47
48            virtual void tick(float dt) override;
49            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
50            virtual void changedOwner() override;
51
52            /// sets TOTAL flags taken
53            inline void setShowTot(int totFlags)
54                { this->totFlags_ = totFlags; }
55            /// returns total flags >=0
56            inline int getShowTot() const
57                { return this->totFlags_; }
58
59            /// sets show tot lives
60            void setShowLives(const bool showLives)
61                { showLives_ = showLives; }
62            /// gets show tot lives
63            const bool getShowLives() const
64                { return showLives_; }
65
66            /// sets show level
67            void setShowLevel(const bool showLevel)
68                { showLevel_ = showLevel; }
69            /// gets show level
70            const bool getShowLevel() const
71                { return showLevel_; }
72
73            /// sets show tot flags
74            void setShowTotFlags(const bool showTotFlags)
75                { showTotFlags_ = showTotFlags; }
76            /// gets show tot flags
77            const bool getShowTotFlags() const
78                { return showTotFlags_; }
79
80            /// sets Game Level
81            inline void setTotLevel(int totLevel)
82                { this->totLevel_ = totLevel; }
83            /// returns level >=0
84            inline int getTotLevel() const
85                { return this->totLevel_; }
86
87        private:
88            Hover* hoverGame_;
89            int totFlags_;
90            int totLevel_;
91            bool showLives_;
92            bool showLevel_;
93            bool showTotFlags_;
94    };
95}
96#endif /* _TFlagsLivesLevelHUD_H__ */
Note: See TracBrowser for help on using the repository browser.