Changeset 12339 for code/branches/OrxoBlox_FS19
- Timestamp:
- May 9, 2019, 9:39:55 AM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw
r12337 r12339 107 107 <MovableEntity rotationrate=0 rotationaxis="0,0,1"> 108 108 <attached> 109 <OrxoBloxCenterpoint name=OrxoBloxcenter dimension=" 100,100" balltemplate=OrxoBloxball battemplate=OrxoBloxbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25 StoneTemplate=OrxoBloxstone WallTemplate=OrxoBloxwall>109 <OrxoBloxCenterpoint name=OrxoBloxcenter dimension="90,100" balltemplate=OrxoBloxball battemplate=OrxoBloxbat ballspeed=200 ballaccfactor=1.0 batspeed=130 batlength=0.25 StoneTemplate=OrxoBloxstone WallTemplate=OrxoBloxwall> 110 110 111 111 <attached> 112 112 <!-- Balken die das Spielfeld begrenzen. --> 113 <Model position="0,0,-50" mesh="cube.mesh" scale3D=" 50,1,1" />114 <Model position=" 50,0,0" mesh="cube.mesh" scale3D="1,1,50"/>115 <Model position="- 50,0,0" mesh="cube.mesh" scale3D="1,1,50"/>113 <Model position="0,0,-50" mesh="cube.mesh" scale3D="45,1,1" /> 114 <Model position="45,0,0" mesh="cube.mesh" scale3D="1,1,50"/> 115 <Model position="-45,0,0" mesh="cube.mesh" scale3D="1,1,50"/> 116 116 </attached> 117 117 </OrxoBloxCenterpoint> -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
r12337 r12339 143 143 // Attach the ball to the centerpoint and set the parameters as specified in the centerpoint, the ball is attached to. 144 144 this->center_->attach(this->ball_); 145 this->ball_->setPosition(0, 0, 40); 145 //Startposition Ball 146 this->ball_->setPosition(0, 0, 50); 146 147 this->ball_->setFieldDimension(this->center_->getFieldDimension()); 147 148 this->ball_->setSpeed(0); -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc
r12336 r12339 144 144 // And its position is set as to not overstep the boundary it has just crossed. 145 145 if (position.z > this->fieldHeight_ / 2){ 146 ChatManager::message("Ball hat das Feld verlassen"); 147 //TODO: ball zerstoeren 146 // Set the ball to be exactly at the boundary. 147 position.z = this-> fieldHeight_ / 2; 148 // Set the velocity to zero 149 this->setSpeed(0); // doesn't work here, why??; 150 //velocity.x = 0; 151 //velocity.y = 0; 152 //velocity.z = 0; 153 orxout() << "Output" << endl; 154 ChatManager::message("Waiting"); 148 155 } 149 156 if (position.z < -this->fieldHeight_ / 2){ … … 203 210 // Set the speed in the direction of the balls current velocity. 204 211 Vector3 velocity = this->getVelocity(); 205 if (velocity.x != 0)212 //if (velocity.x != 0) 206 213 velocity.x = sgn(velocity.x) * this->speed_; 207 else // If the balls current velocity is zero, the speed is set in a random direction.208 velocity.x = this->speed_ * sgn(rnd(-1,1));214 //else // If the balls current velocity is zero, the speed is set in a random direction. 215 // velocity.x = this->speed_ * sgn(rnd(-1,1)); 209 216 //velocity.y = this->speed_; 210 217 velocity.z = this->speed_; -
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxCenterpoint.cc
r12307 r12339 56 56 RegisterObject(OrxoBloxCenterpoint); 57 57 58 this->width_ = 200;59 this->height_ = 120;58 this->width_ = 100; 59 this->height_ = 50; 60 60 this->ballspeed_ = 100; 61 61 this->ballaccfactor_ = 1.0;
Note: See TracChangeset
for help on using the changeset viewer.