- Timestamp:
- May 9, 2019, 2:20:32 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc
r12350 r12356 33 33 34 34 #include "OrxoBloxBall.h" 35 #include "OrxoBloxStones.h" 35 36 #include "OrxoBlox.h" 36 37 #include <bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h> … … 295 296 296 297 297 void OrxoBloxBall::Bounce(OrxoBloxStones* otherObject) {298 void OrxoBloxBall::Bounce(OrxoBloxStones* Stone) { 298 299 299 300 Vector3 velocity = this->getVelocity(); 300 Vector3 position OtherObject = otherObject->getPosition();301 Vector3 positionStone = Stone->getPosition(); 301 302 Vector3 myPosition = this->getPosition(); 302 303 orxout() << "About to Bounce >D" << endl; … … 306 307 //else { 307 308 308 int distance_X = myPosition.x - position OtherObject.x;309 int distance_Z = myPosition.z - position OtherObject.z;309 int distance_X = myPosition.x - positionStone.x; 310 int distance_Z = myPosition.z - positionStone.z; 310 311 311 312 if (distance_X < 0) … … 336 337 337 338 338 void OrxoBloxBall::Collides(OrxoBloxStones* otherObject)339 { 340 341 if( otherObject== nullptr)339 void OrxoBloxBall::Collides(OrxoBloxStones* Stone) 340 { 341 342 if(Stone == nullptr) 342 343 return; 343 344 344 345 orxout() << "About to Bounce >D" << endl; 345 Bounce(otherObject); 346 Bounce(Stone); 347 //if(otherObject->getHealth() <= 0) { 348 Stone->destroy(); 349 //} 350 //otherObject->reduceHealth(); 346 351 } 347 352
Note: See TracChangeset
for help on using the changeset viewer.