Changeset 12371 for code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
- Timestamp:
- May 16, 2019, 1:13:58 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/CMakeLists.txt
r12367 r12371 3 3 OrxoBlox.cc 4 4 OrxoBloxWall.cc 5 OrxoBloxBall.cc6 5 OrxoBloxCenterpoint.cc 7 6 OrxoBloxStones.cc -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12370 r12371 48 48 49 49 #include "OrxoBloxCenterpoint.h" 50 #include "OrxoBloxBall.h"51 50 #include "OrxoBloxStones.h" 52 51 #include "OrxoBloxWall.h" … … 68 67 69 68 this->center_ = nullptr; 70 this->ball_ = nullptr;69 //this->ball_ = nullptr; 71 70 this->futureWall_ = nullptr; 72 71 this->player_ = nullptr; … … 77 76 78 77 // Pre-set the timer, but don't start it yet. 79 this->starttimer_.setTimer(1.0, false, createExecutor(createFunctor(&OrxoBlox:: startBall, this)));78 this->starttimer_.setTimer(1.0, false, createExecutor(createFunctor(&OrxoBlox::LevelUp, this))); 80 79 this->starttimer_.stopTimer(); 81 80 … … 100 99 void OrxoBlox::cleanup() 101 100 { 102 if (this->ball_ != nullptr) // Destroy the ball, if present.103 {104 this->ball_->destroy();105 this->ball_ = nullptr;106 }101 //if (this->ball_ != nullptr) // Destroy the ball, if present. 102 //{ 103 // this->ball_->destroy(); 104 // this->ball_ = nullptr; 105 //} 107 106 108 107 if (this->futureWall_ != nullptr) … … 135 134 if (this->center_ != nullptr) // There needs to be a OrxoBloxCenterpoint, i.e. the area the game takes place. 136 135 { 137 if (this->ball_ == nullptr) // If there is no ball, create a new ball.138 {139 this->ball_ = new OrxoBloxBall(this->center_->getContext());136 //if (this->ball_ == nullptr) // If there is no ball, create a new ball. 137 //{ 138 // this->ball_ = new OrxoBloxBall(this->center_->getContext()); 140 139 // Apply the template for the ball specified by the centerpoint. 141 this->ball_->addTemplate(this->center_->getBalltemplate());142 }140 // this->ball_->addTemplate(this->center_->getBalltemplate()); 141 //} 143 142 144 143 // Attach the ball to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to. 145 this->center_->attach(this->ball_);144 //this->center_->attach(this->ball_); 146 145 //Startposition Ball 147 this->ball_->setPosition(0, 0, 40);148 this->ball_->setFieldDimension(this->center_->getFieldDimension());149 this->ball_->setSpeed(0);150 this->ball_->setAccelerationFactor(this->center_->getBallAccelerationFactor());146 //this->ball_->setPosition(0, 0, 40); 147 //this->ball_->setFieldDimension(this->center_->getFieldDimension()); 148 //this->ball_->setSpeed(0); 149 //this->ball_->setAccelerationFactor(this->center_->getBallAccelerationFactor()); 151 150 152 151 level_=1; … … 286 285 Starts the ball with some default speed. 287 286 */ 288 void OrxoBlox::startBall()289 {290 if (this->ball_ != nullptr && this->center_ != nullptr)291 this->ball_->setSpeed(this->center_->getBallSpeed());292 }287 //void OrxoBlox::startBall() 288 //{ 289 // if (this->ball_ != nullptr && this->center_ != nullptr) 290 // this->ball_->setSpeed(this->center_->getBallSpeed()); 291 //} 293 292 294 OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) { 295 293 /*OrxoBloxStones* OrxoBlox::CheckForCollision(OrxoBloxBall* Ball) { 296 294 //orxout() << "Checking for Collision" << endl; 297 295 Vector3 BallPosition = Ball->getPosition(); … … 314 312 return nullptr; 315 313 } 314 */ 316 315 317 316 void OrxoBlox::playerPreSpawn(PlayerInfo* player) -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
r12370 r12371 89 89 OrxoBloxCenterpoint* getCenterpoint(void) 90 90 { return this->center_; } 91 OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball);91 //OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball); 92 92 virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command 93 93 protected: … … 95 95 void startWall(void); 96 96 void createWall(void); 97 void startBall(); //!< Starts the ball with some default speed.97 //void startBall(); //!< Starts the ball with some default speed. 98 98 void cleanup(); //!< Cleans up the Gametype by destroying the ball and the bats. 99 99 100 100 WeakPtr<OrxoBloxCenterpoint> center_; //!< The playing field. 101 WeakPtr<OrxoBloxBall> ball_; //!< The OrxoBlox ball.101 //WeakPtr<OrxoBloxBall> ball_; //!< The OrxoBlox ball. 102 102 unsigned int level_; 103 103 -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h
r12370 r12371 69 69 { 70 70 class OrxoBlox; 71 class OrxoBloxBall;71 //class OrxoBloxBall; 72 72 class OrxoBloxCenterpoint; 73 73 class OrxoBloxWall;
Note: See TracChangeset
for help on using the changeset viewer.