Changeset 12335
- Timestamp:
- May 2, 2019, 4:17:14 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12332 r12335 224 224 225 225 void OrxoBlox::createWall(void){ 226 orxout() <<"Hello idiot1"<< endl;227 228 226 this->futureWall_ = new OrxoBloxWall(this->center_->getContext()); 229 227 // Apply the stone template to the stone. … … 234 232 235 233 236 this->futureWall_->setPosition( 10, 10, 0.0f);234 this->futureWall_->setPosition(0, 0, 0.0f); 237 235 this->futureWall_->setGame(this); 238 236 } -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.cc
r12332 r12335 19 19 RegisterObject(OrxoBloxWall); 20 20 21 this->num_Stones_ = 2;//1 + static_cast<unsigned int>(rnd(6.0f)); //<! random number between 0 and 7;22 this->size_ = 10.0f;21 this->num_Stones_ = 1 + static_cast<unsigned int>(rnd(6.0f)); //<! random number between 0 and 7; 22 this->size_ = 9.0f; 23 23 this->delay_ = false; 24 24 this->orxoblox_ = this->getOrxoBlox(); … … 28 28 29 29 void OrxoBloxWall::createWall(void){ 30 orxout() <<"Hello idiot"<< endl;31 30 for (unsigned int i=0; i<this->num_Stones_;++i){ 32 orxout() <<i<< endl; 33 OrxoBloxStones* stone = new OrxoBloxStones(this->getContext()); 34 this->TotalStones_.push_back(stone); 35 this->attach(stone); 36 stone->setPosition(size_*i, 0, 0.0f); 31 unsigned int j=1 + static_cast<unsigned int>(rnd(2.0f)); //<! random number between 0 and 2; 32 if(j<2){ 33 this->size_ = 9.0f; 34 OrxoBloxStones* stone = new OrxoBloxStones(this->getContext()); 35 this->TotalStones_.push_back(stone); 36 this->attach(stone); 37 stone->setPosition(size_*i -55.5f, 0, 0.0f); 37 38 38 39 39 40 40 if(this->orxoblox_ != nullptr) 41 { 42 stone->setGame(this->orxoblox_); 43 if(this->orxoblox_->getCenterpoint() != nullptr) 44 stone->addTemplate(this->orxoblox_->getCenterpoint()->getStoneTemplate()); 41 if(this->orxoblox_ != nullptr) 42 { 43 stone->setGame(this->orxoblox_); 44 if(this->orxoblox_->getCenterpoint() != nullptr) 45 stone->addTemplate(this->orxoblox_->getCenterpoint()->getStoneTemplate()); 46 else 47 orxout()<< "tetris_->getCenterpoint == nullptr in TetrisBrick.cc"<< endl; 48 } 45 49 else 46 orxout()<< "tetris_ ->getCenterpoint== nullptr in TetrisBrick.cc"<< endl;50 orxout()<< "tetris_ == nullptr in TetrisBrick.cc"<< endl; 47 51 } 48 else49 orxout()<< "tetris_ == nullptr in TetrisBrick.cc"<< endl;50 52 51 53 }
Note: See TracChangeset
for help on using the changeset viewer.