Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9030 was 8706, checked in by dafrick, 13 years ago

Merging presentation branch back into trunk.
There are many new features and also a lot of other changes and bugfixes, if you want to know, digg through the svn log.
Not everything is yet working as it should, but it should be fairly stable. If you habe any bug reports, just send me an email.

  • Property svn:eol-style set to native
File size: 2.7 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            void setGame(Tetris* tetris)
78                { assert(tetris); tetris_ = tetris; }
79
80        private:
81            void enableMovement(void)
82                { this->delay_ = false; }
83           
84            float size_; //!< The dimensions a stone has in the game world.
85            bool delay_;
86            Timer delayTimer_;
87
88            Tetris* tetris_;
89    };
90}
91
92#endif /* _TetrisStone_H__ */
Note: See TracBrowser for help on using the repository browser.