Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/Highscore.h @ 11715

Last change on this file since 11715 was 11715, checked in by landauf, 6 years ago

[Highscore_HS16] removed playerName from Highscore because the player already has a name (see HumanPlayer.nick)

File size: 1.1 KB
Line 
1#include <string>
2#include <vector>
3
4#include "OrxonoxPrereqs.h"
5#include "core/config/Configurable.h"
6#include "util/Singleton.h"
7
8// tolua_begin
9namespace orxonox
10{
11class _OrxonoxExport Highscore
12// tolua_end
13 : public Singleton<Highscore>, public Configurable
14{ //tolua_export
15    friend class Singleton<Highscore>;
16    public:
17        Highscore();              // Constructor
18        void setConfigValues(); // Inherited function
19
20        void storeHighscore(const std::string& level, int points, PlayerInfo* player);
21        int getHighestScoreOfGame(const std::string& game);
22
23        // tolua_begin
24        inline unsigned int getNumberOfHighscores()
25            { return this->highscores_.size(); }
26        inline const std::string& getHighscore(unsigned int index)
27            { return this->highscores_[index]; }
28
29        static Highscore& getInstance()
30            { return Singleton<Highscore>::getInstance(); }
31        // tolua_end
32
33    private:
34        std::vector<std::string> highscores_;
35        static Highscore* singletonPtr_s;
36}; //tolua_export
37
38
39} //tolua_export
Note: See TracBrowser for help on using the repository browser.