- Timestamp:
- Nov 19, 2014, 4:08:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4Dgame.cc
r10121 r10131 45 45 #include "core/config/ConfigValueIncludes.h" 46 46 #include "infos/PlayerInfo.h" 47 #include "core/command/ConsoleCommand.h" 47 48 48 49 #include "gamestates/GSLevel.h" … … 53 54 namespace orxonox 54 55 { 56 57 SetConsoleCommand("Mini4Dgame", "setStone", &Mini4Dgame::setStone).addShortcut(); 55 58 56 59 RegisterUnloadableClass(Mini4Dgame); … … 65 68 66 69 this->center_ = 0; 67 //TODO: player Null setzen 70 this->board_ = 0; 71 72 // Set the type of Bots for this particular Gametype. 73 //this->botclass_ = Class(Mini4DgameBot); 68 74 } 69 75 … … 87 93 } 88 94 89 /*90 bool Mini4Dgame::isValidMove(Vector4* move, const Mini4DgameBoard* board)91 {92 93 }94 */95 96 97 95 /** 98 96 @brief 99 Starts the Tetris minigame.97 Starts the mini4Dgame. 100 98 */ 101 99 void Mini4Dgame::start() … … 103 101 if (this->center_ != NULL) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place. 104 102 { 105 //TODO: create all objects if they don't exist so far and attach the parameters specified in the centerpoint to them 103 if (this->board_ == NULL) 104 { 105 this->board_ = new Mini4DgameBoard(this->center_->getContext()); 106 // Apply the template for the ball specified by the centerpoint. 107 this->board_->addTemplate(this->center_->getBoardtemplate()); 108 } 109 110 // Attach the board to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to. 111 this->center_->attach(this->board_); 112 this->board_->setPosition(0, 0, 0); 113 106 114 } 107 115 else // If no centerpoint was specified, an error is thrown and the level is exited. … … 169 177 } 170 178 179 static void Mini4Dgame::setStone(Vector4 move, const int playerColor, Mini4DgameBoard* board) 180 { 181 board->makeMove(move,playerColor); 182 } 171 183 184 void Mini4Dgame::win(Mini4DgameWinner winner) 185 { 186 187 } 172 188 }
Note: See TracChangeset
for help on using the changeset viewer.