Orxonox  0.0.5 Codename: Arcturus
TetrisStone.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  * ...
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _TetrisStone_H__
36 #define _TetrisStone_H__
37 
38 #include "tetris/TetrisPrereqs.h"
39 
41 #include "tools/Timer.h"
42 
43 namespace orxonox
44 {
45 
54  {
55  public:
56  TetrisStone(Context* context);
57  virtual ~TetrisStone() {}
58 
59  virtual void moveFrontBack(const Vector2& value);
60  virtual void moveRightLeft(const Vector2& value);
61 
62  virtual void changedPlayer();
63 
68  void setSize(float size)
69  { this->size_ = size; }
74  float getSize(void) const
75  { return this->size_; }
76 
77  void setGame(Tetris* tetris)
78  { assert(tetris); tetris_ = tetris; }
79 
80  private:
81  void enableMovement(void)
82  { this->delay_ = false; }
83  void unlockRotation(void)
84  { this->lockRotation_ = false; }
85 
86  float size_;
87  bool delay_;
91 
93  };
94 }
95 
96 #endif /* _TetrisStone_H__ */
Timer delayTimer_
Definition: TetrisStone.h:89
void enableMovement(void)
Definition: TetrisStone.h:81
void unlockRotation(void)
Definition: TetrisStone.h:83
void setGame(Tetris *tetris)
Definition: TetrisStone.h:77
Definition: MovableEntity.h:42
bool lockRotation_
Definition: TetrisStone.h:88
Shared library macros, enums, constants and forward declarations for the tetris module ...
Timer rotationTimer_
Definition: TetrisStone.h:90
Declaration of the Timer class, used to call functions after a given time-interval.
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Definition: Tetris.h:54
float size_
The dimensions a stone has in the game world.
Definition: TetrisStone.h:86
Definition: Context.h:45
bool delay_
Definition: TetrisStone.h:87
Definition: TetrisStone.h:53
#define _TetrisExport
Definition: TetrisPrereqs.h:58
float getSize(void) const
Get the size of the stone.
Definition: TetrisStone.h:74
Timer is a helper class that executes a function after a given amount of seconds in game-time...
Definition: Timer.h:105
Tetris * tetris_
!< This timer is used to filter out multiple rotation inputs.
Definition: TetrisStone.h:92
void setSize(float size)
Set the size of the stone.
Definition: TetrisStone.h:68
virtual ~TetrisStone()
Definition: TetrisStone.h:57