Changeset 10235 for code/branches/surfaceraceHS14/src
- Timestamp:
- Feb 1, 2015, 3:43:14 PM (10 years ago)
- Location:
- code/branches/surfaceraceHS14/src/modules/dodgerace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/surfaceraceHS14/src/modules/dodgerace/DodgeRace.cc
r10232 r10235 95 95 counter = counter + (currentPosition - lastPosition); 96 96 lastPosition = currentPosition; 97 point = currentPosition;98 getPlayer()->speed = 830 - (point / 1000);99 100 for(u int i=0; i < cubeList.size();i++)97 point = (int) currentPosition; 98 getPlayer()->speed = 830.0f - (point / 1000); 99 100 for(unsigned int i=0; i < cubeList.size();i++) 101 101 { 102 102 if(cubeList.at(i)->getPosition().x < currentPosition-3000) … … 123 123 } 124 124 125 cube->setPosition(getPlayer()->getWorldPosition() + Vector3(5000 , 0, -3600+ (i*1200)));125 cube->setPosition(getPlayer()->getWorldPosition() + Vector3(5000.0f, 0.0f, -3600.0f + (i*1200))); 126 126 //stEntity->setScale3D(50,50,50); 127 127 } … … 169 169 orxout() << "start" << endl; 170 170 init(); 171 for(u int i=0; i< cubeList.size();i++)171 for(unsigned int i=0; i< cubeList.size();i++) 172 172 { 173 173 cubeList.at(i)->destroy(); -
code/branches/surfaceraceHS14/src/modules/dodgerace/DodgeRace.h
r10234 r10235 98 98 int lives; 99 99 int multiplier; 100 int counter;100 float counter; 101 101 int pattern; 102 int currentPosition;103 int lastPosition;102 float currentPosition; 103 float lastPosition; 104 104 105 105 private:
Note: See TracChangeset
for help on using the changeset viewer.