Changeset 12388 for code/branches/OrxoBlox_FS19/src/modules/weapons
- Timestamp:
- May 16, 2019, 4:24:32 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc
r12387 r12388 167 167 168 168 // Get the current position, velocity and acceleration of the ball. 169 bool suicidal = false; 169 170 Vector3 position = this->getPosition(); 170 171 Vector3 velocity = this->getVelocity(); … … 185 186 186 187 orxoblox_->LevelUp(); 187 188 189 //this->setSpeed(0); // doesn't work here, why??; 190 //Stopping ball 191 //orxout() << "Ball stopped" << endl; 192 velocity.x = 0; 193 velocity.y = 0; 194 velocity.z = 0; 195 196 //ChatManager::message("Waiting for your input"); 197 //Input new speed here: 198 //ChatManager::message("Setting new speed"); 188 suicidal = true; 199 189 200 //%%%%%%%%%%%%201 //MAUSPOSITION202 //%%%%%%%%%%%%203 //Reads current mouse position204 //TODO: read Mouse position on click!205 //int mousex = InputManager::getInstance().getMousePosition().first;206 //int mousey = InputManager::getInstance().getMousePosition().second;207 //ChatManager::message("Read mouse position");208 //orxout() << "Mouseposition" << endl;209 //orxout() << mousex << endl;210 //ChatManager::message(mousex);211 //ChatManager::message("mousey");212 //ChatManager::message(mousey);213 //Set new speed here!!214 velocity.x = rnd(-100,100);215 velocity.z = rnd(-50,-100);216 217 218 190 } 219 191 if (position.z < -this->fieldHeight_){ … … 258 230 this->setPosition(position); 259 231 //this->Collides((this->orxoblox_->CheckForCollision(this))); 232 if (suicidal == true) { 233 this->destroy(); 234 } 260 235 261 236 }
Note: See TracChangeset
for help on using the changeset viewer.