- Timestamp:
- Dec 4, 2014, 5:16:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/minigame4DHS14/src/modules/mini4Dgame/Mini4DgameBoard.cc
r10131 r10156 38 38 39 39 #include "gametypes/Gametype.h" 40 #include "graphics/BlinkingBillboard.h" 40 41 41 42 #include "core/XMLPort.h" … … 57 58 //this->registerVariables(); 58 59 59 //initialize sound60 //initialize board 60 61 for(int i=0;i<4;i++){ 61 62 for(int j=0;j<4;j++){ … … 67 68 } 68 69 } 70 71 this->checkGametype(); 69 72 } 70 73 … … 123 126 { 124 127 this->board[(int)move.x][(int)move.y][(int)move.z][(int)move.w] = (mini4DgamePlayerColor::color) playerColor; 125 //BlinkingBillboard* bb = new BlinkingBillboard(this->getContext()); 126 //bb->setPosition(0,0,0); 128 BlinkingBillboard* bb = new BlinkingBillboard(this->getContext()); 129 orxout(user_status) << "Mini4Dgame: move.x " << move.x << endl; 130 131 bb->setPosition(60*(int)move.x-90,60*(int)move.y-90,60*(int)move.z-90); 132 bb->setFrequency(0.6); 133 bb->setAmplitude(0.1); 134 //bb->setMaterial("Flares/lensflare"); 135 bb->setMaterial("Numbers/One"); 136 bb->setColour(ColourValue(0,1,0)); 137 138 this->attach(bb); 139 140 127 141 Mini4DgameWinner winner = this->getWinner(); 128 142 if(winner.color_ != mini4DgamePlayerColor::none) 129 143 { 144 orxout(user_status) << "Mini4Dgame: win!!!!!!!" << endl; 130 145 //win(winner); 131 146 } … … 837 852 return winner; 838 853 } 854 855 /** 856 @brief 857 Is called when the gametype has changed. 858 */ 859 void Mini4DgameBoard::changedGametype() 860 { 861 SUPER(Mini4DgameBoard, changedGametype); 862 863 // Check, whether it's still Mini4Dgame. 864 this->checkGametype(); 865 } 866 867 /** 868 @brief 869 Checks whether the gametype is Mini4Dgame and if it is, sets its centerpoint. 870 */ 871 void Mini4DgameBoard::checkGametype() 872 { 873 if (this->getGametype() != NULL && this->getGametype()->isA(Class(Mini4Dgame))) 874 { 875 Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype().get()); 876 Mini4DgameGametype->setGameboard(this); 877 } 878 } 839 879 }
Note: See TracChangeset
for help on using the changeset viewer.