Last change
on this file since 11715 was
11715,
checked in by landauf, 7 years ago
|
[Highscore_HS16] removed playerName from Highscore because the player already has a name (see HumanPlayer.nick)
|
File size:
1.1 KB
|
Rev | Line | |
---|
[11313] | 1 | #include <string> |
---|
[11715] | 2 | #include <vector> |
---|
| 3 | |
---|
| 4 | #include "OrxonoxPrereqs.h" |
---|
[11313] | 5 | #include "core/config/Configurable.h" |
---|
| 6 | #include "util/Singleton.h" |
---|
[11715] | 7 | |
---|
[11313] | 8 | // tolua_begin |
---|
| 9 | namespace orxonox |
---|
| 10 | { |
---|
| 11 | class _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 |
---|
[11315] | 19 | |
---|
[11715] | 20 | void storeHighscore(const std::string& level, int points, PlayerInfo* player); |
---|
| 21 | int getHighestScoreOfGame(const std::string& game); |
---|
| 22 | |
---|
[11313] | 23 | // tolua_begin |
---|
| 24 | inline unsigned int getNumberOfHighscores() |
---|
[11715] | 25 | { return this->highscores_.size(); } |
---|
| 26 | inline const std::string& getHighscore(unsigned int index) |
---|
| 27 | { return this->highscores_[index]; } |
---|
[11313] | 28 | |
---|
| 29 | static Highscore& getInstance() |
---|
[11715] | 30 | { return Singleton<Highscore>::getInstance(); } |
---|
[11313] | 31 | // tolua_end |
---|
| 32 | |
---|
| 33 | private: |
---|
[11315] | 34 | std::vector<std::string> highscores_; |
---|
[11313] | 35 | static Highscore* singletonPtr_s; |
---|
| 36 | }; //tolua_export |
---|
| 37 | |
---|
| 38 | |
---|
[11715] | 39 | } //tolua_export |
---|
Note: See
TracBrowser
for help on using the repository browser.