[Orxonox-commit 7687] r12280 - code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
ahuwyler at orxonox.net
ahuwyler at orxonox.net
Thu Apr 4 16:26:09 CEST 2019
Author: ahuwyler
Date: 2019-04-04 16:26:09 +0200 (Thu, 04 Apr 2019)
New Revision: 12280
Modified:
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
Log:
better now
Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc 2019-04-04 14:21:48 UTC (rev 12279)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc 2019-04-04 14:26:09 UTC (rev 12280)
@@ -66,6 +66,7 @@
this->center_ = nullptr;
this->ball_ = nullptr;
this->bat_[0] = nullptr;
+ this->futureWall_ = nullptr;
//this->setHUDTemplate("pongHUD");
//Error when specified
@@ -279,9 +280,26 @@
/*void OrxoBlox::createStonewall(void){
this->futureWall_ = new OrxoBolxWall(this->center_->getContext());
+ }
+ /*void Tetris::createBrick(void) //TODO: random rotation offset between 0 and 3 (times 90°)
+ {
+ // create new futureBrick_
+ this->futureBrick_ = new TetrisBrick(this->center_->getContext());
+ // Apply the stone template to the stone.
+ this->futureBrick_->addTemplate(this->center_->getBrickTemplate());
+
+ // Attach the brick to the Centerpoint and set the position of the brick to be at the left side.
+ this->center_->attach(this->futureBrick_);
+ float xPos = (this->center_->getWidth()*1.6f + ((this->center_->getWidth() % 2)*2-1)/2.0f)*this->center_->getStoneSize();
+ float yPos = (this->center_->getHeight()-5.1f)*this->center_->getStoneSize();
+
+ this->futureBrick_->setPosition(xPos, yPos, 0.0f);
+ this->futureBrick_->setGame(this);
+ }
+
}*/
/**
Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h 2019-04-04 14:21:48 UTC (rev 12279)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h 2019-04-04 14:26:09 UTC (rev 12280)
@@ -95,6 +95,7 @@
WeakPtr<OrxoBloxBat> bat_[1]; //!< The two bats.
Timer starttimer_; //!< A timer to delay the start of the game.
int scoreLimit_; //!< If a player scored that much points, the game is ended.
+ WeakPtr<OrxoBloxWall> futureWall_;
};
}
More information about the Orxonox-commit
mailing list