[10097] | 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 Mini4Dgame.h |
---|
| 31 | @brief Declaration of the Mini4Dgame class. |
---|
| 32 | */ |
---|
| 33 | |
---|
| 34 | #ifndef _Mini4Dgame_H__ |
---|
| 35 | #define _Mini4Dgame_H__ |
---|
| 36 | |
---|
| 37 | #include "gametypes/Deathmatch.h" |
---|
| 38 | |
---|
| 39 | namespace orxonox |
---|
| 40 | { |
---|
| 41 | /** |
---|
| 42 | @brief |
---|
| 43 | |
---|
| 44 | @author |
---|
| 45 | |
---|
| 46 | */ |
---|
| 47 | class Mini4Dgame : public Deathmatch |
---|
| 48 | { |
---|
| 49 | public: |
---|
| 50 | Mini4Dgame(Context* context); //!< Constructor. Registers and initializes the object. |
---|
| 51 | virtual ~Mini4Dgame(); //!< Destructor. Cleans up, if initialized. |
---|
| 52 | |
---|
| 53 | virtual void start(void); //!< Starts the Mini4Dgame minigame. |
---|
| 54 | virtual void end(void); ///!< Ends the Mini4Dgame minigame. |
---|
| 55 | |
---|
| 56 | virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player. |
---|
| 57 | |
---|
| 58 | void setCenterpoint(Mini4DgameCenterpoint* center) |
---|
| 59 | { this->center_ = center; } |
---|
| 60 | |
---|
[10100] | 61 | //TODO: enum colors |
---|
| 62 | PlayerInfo* getPlayer(int color) const; //!< Get the player with the specified color. |
---|
[10097] | 63 | |
---|
| 64 | |
---|
| 65 | //bool isValidMove(Vector4* move, const Mini4DgameBoard* board);//!< Checks if the move is valid |
---|
| 66 | |
---|
| 67 | protected: |
---|
| 68 | virtual void spawnPlayersIfRequested(); //!< Spawns player. |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | private: |
---|
| 72 | void cleanup(void); //!< Cleans up the Gametype by destroying the ball and the bats. |
---|
| 73 | |
---|
[10100] | 74 | PlayerInfo* players[3]; |
---|
[10097] | 75 | |
---|
| 76 | WeakPtr<Mini4DgameCenterpoint> center_; //!< The playing field. |
---|
| 77 | |
---|
| 78 | //TODO: Board is missing up to now |
---|
| 79 | }; |
---|
| 80 | } |
---|
| 81 | |
---|
| 82 | #endif /* _Mini4Dgame_H__ */ |
---|