Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 28, 2016, 4:53:24 PM (8 years ago)
Author:
kappenh
Message:

Able to save scores in ini. todo: save and retrieve pong score

Location:
code/branches/Highscore_HS16
Files:
2 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Highscore_HS16/data/defaultConfig/orxonox.ini

    r11052 r11313  
    99campaignMissions_[7] = "shuttleAttack.oxw"
    1010campaignMissions_[8] = "shuttleRetaliation.oxw"
     11
     12[Highscore]
     13tests_[0] = "name1"
     14tests_[1] = "name2"
     15
  • code/branches/Highscore_HS16/data/gui/scripts/HighscoreMenu.lua

    r11304 r11313  
    2424       
    2525        P.scoreList = {}
    26        
    27         for i=1,20 do
    28                 table.insert(P.nameList, "Player "..i)
     26        test = orxonox.Highscore:getInstance():getNumberOfHighscores()
     27
     28        for i=0,orxonox.Highscore:getInstance():getNumberOfHighscores()-1 do
     29                table.insert(P.nameList, orxonox.Highscore:getInstance():getHighscore(i))
    2930                table.insert(P.scoreList, i)
    3031       
     
    4142            P.createFilterTab(v:getName(), v:getName())
    4243        end
    43         local highscores = v:getHighscores()
    44         orxonox.CommandExecutor:execute("log test:".. highscores)
     44        --local highscores = v:getHighscores()
     45        --orxonox.CommandExecutor:execute("log test:".. highscores)
    4546
    4647    end
     
    5556
    5657function P.onShow()
     58        P.nameList = {}
     59       
     60        P.scoreList = {}
     61        test = orxonox.Highscore:getInstance():getNumberOfHighscores()
     62
     63        for i=0,orxonox.Highscore:getInstance():getNumberOfHighscores()-1 do
     64                table.insert(P.nameList, orxonox.Highscore:getInstance():getHighscore(i))
     65                table.insert(P.scoreList, i)
     66       
     67        end
    5768    --local description = winMgr:getWindow("orxonox/HighscoreText")
    5869
  • code/branches/Highscore_HS16/src/libraries/core/CMakeLists.txt

    r11304 r11313  
    2727  GameMode.cc
    2828  GameState.cc
    29   Highscore.cc
    3029  Language.cc
    3130  Loader.cc
     
    9190    GraphicsManager.h
    9291    GUIManager.h
    93     Highscore.h
    9492    Loader.h
    9593    LuaState.h
  • code/branches/Highscore_HS16/src/modules/jump/Jump.cc

    r11071 r11313  
    3434#include "Jump.h"
    3535#include "core/CoreIncludes.h"
     36#include "Highscore.h"
    3637
    3738#include "JumpCenterpoint.h"
     
    311312        cleanup();
    312313        GSLevel::startMainMenu();
    313 
     314        orxout() << "Test Highscore" << endl;
     315        if (Highscore::exists()){
     316                    orxout() << "exists" << endl;
     317                   Highscore::getInstance().storeHighscore("player","jump",sectionNumber_ - 2);
     318          }
    314319        Deathmatch::end();
    315320    }
  • code/branches/Highscore_HS16/src/orxonox/CMakeLists.txt

    r11304 r11313  
    2727  LevelInfo.cc
    2828  LevelManager.cc
     29  Highscore.cc
    2930  Main.cc
    3031  MoodManager.cc
     
    6162    LevelInfo.h
    6263    LevelManager.h
     64    Highscore.h
    6365    MoodManager.h
    6466    controllers/HumanController.h
Note: See TracChangeset for help on using the changeset viewer.