[Orxonox-commit 7739] r12332 - code/branches/OrxoBlox_FS19/src/modules/OrxoBlox

ahuwyler at orxonox.net ahuwyler at orxonox.net
Thu May 2 15:52:29 CEST 2019


Author: ahuwyler
Date: 2019-05-02 15:52:29 +0200 (Thu, 02 May 2019)
New Revision: 12332

Modified:
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.cc
   code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.h
Log:
jetzt mehrere Bloecke

Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc	2019-05-02 13:30:57 UTC (rev 12331)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc	2019-05-02 13:52:29 UTC (rev 12332)
@@ -223,6 +223,8 @@
     }
 
     void OrxoBlox::createWall(void){
+        orxout() <<"Hello idiot1"<< endl;
+
         this->futureWall_ = new OrxoBloxWall(this->center_->getContext());
         // Apply the stone template to the stone.
         this->futureWall_->addTemplate(this->center_->getWallTemplate());

Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.cc	2019-05-02 13:30:57 UTC (rev 12331)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.cc	2019-05-02 13:52:29 UTC (rev 12332)
@@ -18,7 +18,8 @@
     {
         RegisterObject(OrxoBloxWall);
 
-        this->num_Stones_ = 1 + static_cast<unsigned int>(rnd(6.0f)); //<! random number between 0 and 7;
+        this->num_Stones_ = 2;//1 + static_cast<unsigned int>(rnd(6.0f)); //<! random number between 0 and 7;
+        this->size_ = 10.0f;
         this->delay_ = false;
         this->orxoblox_ = this->getOrxoBlox();
         this->createWall();
@@ -26,15 +27,13 @@
 
 
     void OrxoBloxWall::createWall(void){
-
+        orxout() <<"Hello idiot"<< endl;
         for (unsigned int i=0; i<this->num_Stones_;++i){
+            orxout() <<i<< endl;
             OrxoBloxStones* stone = new OrxoBloxStones(this->getContext());
-
-
             this->TotalStones_.push_back(stone);
             this->attach(stone);
-            
-            stone->setPosition(0.0f, i, 0.0f);
+            stone->setPosition(size_*i, 0, 0.0f);
 
 
 

Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.h	2019-05-02 13:30:57 UTC (rev 12331)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxWall.h	2019-05-02 13:52:29 UTC (rev 12332)
@@ -46,6 +46,7 @@
             OrxoBlox* getOrxoBlox();
             unsigned int totalhealth_;
             unsigned int num_Stones_;
+            unsigned int size_;
             std::vector<OrxoBloxStones*> TotalStones_; //!< A list of all stones in a Wall.
             bool delay_;
             OrxoBlox* orxoblox_;



More information about the Orxonox-commit mailing list