Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/OrxoBlox_FS19/src/modules/orxokart/TimeHUD.h @ 12371

Last change on this file since 12371 was 12128, checked in by ottka, 6 years ago

Make two levels and more

File size: 1.9 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 *      Cyrill Burgener
24 *
25 */
26
27 /**
28    @file TimeHUD.h
29    @brief Declaration of the TimeHUD class.
30*/
31
32#ifndef _TimeHUD_H__
33#define _TimeHUD_H__
34
35#include "OrxoKartPrereqs.h"
36#include <iostream>
37#include <fstream>
38
39#include "tools/interfaces/Tickable.h"
40#include "overlays/OverlayText.h"
41
42namespace orxonox
43{
44    class _OrxoKartExport TimeHUD : public OverlayText, public Tickable
45    {
46        public:
47            TimeHUD(Context* context);
48
49            virtual void tick(float dt) override;
50            virtual void changedOwner() override;
51
52            /// sets if the clock is running
53            inline void setRunning(bool running)
54                { this->running_ = running; }
55            /// returns if the clock is running
56            inline bool isRunning() const
57                { return this->running_; }
58
59            void reset();
60
61        private:
62            OrxoKart* orxokartGame_;
63            float time_;
64            bool running_;
65            bool score_set = false;
66    };
67}
68#endif /* _TimeHUD_H__ */
Note: See TracBrowser for help on using the repository browser.