- Timestamp:
- Dec 3, 2017, 9:22:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
r11600 r11620 34 34 #include "Highscore.h" 35 35 #include "core/CoreIncludes.h" 36 37 36 38 #include "core/EventIncludes.h" 37 39 #include "core/command/Executor.h" … … 45 47 46 48 #include "FlappyOrxCenterPoint.h" 49 #include "FlappyOrxAsteroid.h" 47 50 #include "FlappyOrxShip.h" 48 #include "FlappyOrxAsteroid.h"49 51 50 52 #include "core/command/ConsoleCommand.h" … … 63 65 bIsDead = true; 64 66 firstGame = true; //needed for the HUD 65 speed = 0; 66 spawnDistance=300; //distance between tubes67 68 tubeDistance=200; //distance between tubes 67 69 tubeOffsetX=500; //tube offset (so that we can't see them spawn) 68 70 … … 81 83 82 84 //Spawn a new Tube when the spawn distance is reached 83 if(this->tubes.size()==0||x-tubes.back()+tubeOffsetX> spawnDistance){85 if(this->tubes.size()==0||x-tubes.back()+tubeOffsetX>tubeDistance){ 84 86 spawnTube(); 85 87 this->tubes.push(x+tubeOffsetX); … … 101 103 void FlappyOrx::levelUp(){ 102 104 point++; 103 spawnDistance = spawnDistance-3*point; //smaller spawn Distance104 getPlayer()->setSpeed( this->speed+.5*point); //increase speed105 tubeDistance = tubeDistanceBase-tubeDistanceIncrease*point; //smaller spawn Distance 106 getPlayer()->setSpeed(speedBase+speedIncrease*point); //increase speed 105 107 } 106 108
Note: See TracChangeset
for help on using the changeset viewer.