Orxonox  0.0.5 Codename: Arcturus
CountDown.h
Go to the documentation of this file.
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  * Johannes Ritz
24  * Co-authors:
25  * ...
26  *
27  */
28 
29 #ifndef _CountDown_H__
30 #define _CountDown_H__
31 
33 
36 #include "overlays/OverlayText.h"
37 
38 namespace orxonox
39 {
41  {
42  public:
43  CountDown(Context* context);
44  virtual ~CountDown();
45 
46  virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
47  virtual void changedOwner() override;
48  virtual void tick(float dt) override;
49 
50  inline void setCounter(float value)
51  { this->counter_ = value + 0.99f; }
52  inline float getCounter() const
53  { return this->counter_; }
54  inline void setSpeed(float value)
55  { this->speed_ = value; }
56  inline float getSpeed() const
57  { return this->speed_; }
58 
59  protected:
60 
61  private:
63  float counter_;
64  float speed_;
66  };
67 }
68 #endif /* _CountDown_H__ */
Definition: OverlayText.h:41
float getCounter() const
Definition: CountDown.h:52
Declaration of the Tickable interface.
void setCounter(float value)
Definition: CountDown.h:50
xmlelement
Definition: Super.h:519
float counter_
Definition: CountDown.h:63
#define _OverlaysExport
Definition: OverlaysPrereqs.h:60
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Shared library macros, enums, constants and forward declarations for the overlays module ...
Mode
Definition: CorePrereqs.h:102
PlayerInfo * owner_
Definition: CountDown.h:62
Definition: Context.h:45
float speed_
Definition: CountDown.h:64
bool hasStopped_
Definition: CountDown.h:65
void setSpeed(float value)
Definition: CountDown.h:54
Definition: PlayerInfo.h:39
float getSpeed() const
Definition: CountDown.h:56
The Tickable interface provides a tick(dt) function, that gets called every frame.
Definition: Tickable.h:52
Definition: CountDown.h:40