Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 3, 2017, 9:22:33 PM (7 years ago)
Author:
pascscha
Message:

XML Port

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc

    r11600 r11620  
    3434#include "Highscore.h"
    3535#include "core/CoreIncludes.h"
     36
     37
    3638#include "core/EventIncludes.h"
    3739#include "core/command/Executor.h"
     
    4547
    4648#include "FlappyOrxCenterPoint.h"
     49#include "FlappyOrxAsteroid.h"
    4750#include "FlappyOrxShip.h"
    48 #include "FlappyOrxAsteroid.h"
    4951
    5052#include "core/command/ConsoleCommand.h"
     
    6365        bIsDead = true;
    6466        firstGame = true;                   //needed for the HUD
    65         speed = 0;
    66         spawnDistance=300;                  //distance between tubes
     67
     68        tubeDistance=200;                  //distance between tubes
    6769        tubeOffsetX=500;                    //tube offset (so that we can't see them spawn)
    6870
     
    8183
    8284        //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){
    8486            spawnTube();
    8587            this->tubes.push(x+tubeOffsetX);
     
    101103    void FlappyOrx::levelUp(){
    102104        point++;
    103         spawnDistance = spawnDistance-3*point;            //smaller spawn Distance
    104         getPlayer()->setSpeed(this->speed+.5*point);    //increase speed
     105        tubeDistance = tubeDistanceBase-tubeDistanceIncrease*point;            //smaller spawn Distance
     106        getPlayer()->setSpeed(speedBase+speedIncrease*point);    //increase speed
    105107    }
    106108
Note: See TracChangeset for help on using the changeset viewer.