Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2017, 3:32:34 PM (8 years ago)
Author:
zarron
Message:

with Highscores

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFigure.cc

    r11599 r11601  
    5050#include "SOBCastlestone.h"
    5151#include "SOBFireball.h"
     52#include "Highscore.h"
    5253#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
    5354
     
    208209            bool direction = ((this->getWorldOrientation().getRoll().valueRadians())>-1.6&&(this->getWorldOrientation().getRoll().valueRadians()<1.6));
    209210            ball->setDirection(direction);
    210             orxout() << "Rotation: " << this->getWorldOrientation().getRoll() << " direction: "<< direction <<endl;
    211211            if(direction)
    212212            {
     
    229229
    230230    bool inputAllowed = true;
     231    //SOB* SOBGame = orxonox_cast<SOB*>(getGametype());
    231232
    232233    //the particle spawner that generates the fire from the backpack when pressed
     
    365366            velocity.x = 0;
    366367            velocity.y = 20;
     368            setOrientation(Vector3::UNIT_Z, Degree(90));
    367369        }
    368370        if (reachedLvlEndState_ == 4) {
     371            //Highscore
     372            if (Highscore::exists()){
     373                    int score = SOBGame->getPoints();
     374                    if(score > Highscore::getInstance().getHighestScoreOfGame("Super Orxo Bros."))
     375                        Highscore::getInstance().storeHighscore("Super Orxo Bros.",score);
     376                        SOBGame->newHighscore=1;
     377
     378            }
    369379            lvlEnded_ = true;
    370380            dead_ = true;
Note: See TracChangeset for help on using the changeset viewer.