Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/tetris/src/modules/tetris/TetrisStone.h @ 8249

Last change on this file since 8249 was 8249, checked in by dafrick, 9 years ago

Re-adding tetris module.

File size: 2.5 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 *      ...
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30    @file TetrisStone.h
31    @brief Declaration of the TetrisStone class.
32    @ingroup Tetris
33*/
34
35#ifndef _TetrisStone_H__
36#define _TetrisStone_H__
37
38#include "tetris/TetrisPrereqs.h"
39
40#include "worldentities/ControllableEntity.h"
41#include "tools/Timer.h"
42
43namespace orxonox
44{
45
46    /**
47    @brief
48
49    @author
50
51    @ingroup Tetris
52    */
53    class _TetrisExport TetrisStone : public ControllableEntity
54    {
55        public:
56            TetrisStone(BaseObject* creator); //!< Constructor. Registers and initializes the object.
57            virtual ~TetrisStone() {}
58
59            virtual void moveFrontBack(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
60            virtual void moveRightLeft(const Vector2& value); //!< Overloaded the function to steer the bat up and down.
61
62            virtual void changedPlayer(); //!< Is called when the player changed.
63
64            /**
65            @brief Set the size of the stone.
66            @param size The dimensions a stone has in the game world. (A stone is a cube)
67            */
68            void setSize(float size)
69                { this->size_ = size; }
70            /**
71            @brief Get the size of the stone.
72            @return Returns the dimensions a stone has in the game world. (A stone is a cube)
73            */
74            float getSize(void) const
75                { return this->size_; }
76
77        private:
78            void enableMovement(void)
79                { this->delay_ = false; }
80           
81            float size_; //!< The dimensions a stone has in the game world.
82            bool delay_;
83            Timer delayTimer_;
84    };
85}
86
87#endif /* _TetrisStone_H__ */
Note: See TracBrowser for help on using the repository browser.