Differences

This shows you the differences between two versions of the page.

Link to this comparison view

highscores [19-07-2017 10:26] (current)
185.48.102.186 created
Line 1: Line 1:
 +==== Highscores ====
 +The highscore system is implemented by default. It has 10 highscores limit and is sorted from the highest one at the top to the lowest one at the bottom. Highscores are memorized using //​PlayerPrefs//​ and are stored on the pc where the game is installed. You are able to reset the highscores by reset button in the top right corner.
  
 +To adjust the max entries number and first entries which are show after reset , go to //​MainUIScene//​ and find an object //​HighscoreHandler//​ here you can adjust max entries and first entries.
 +
 +To write a new entry of highscore and end the game we use a static function ( //​PT_ScoreEntryStart.GameOverEnd(int score)// ) which can be called from anywhere in the code, the value type of the score is integer. Here is an example: ​
 +
 +<​code>​
 +void SomeGameEndFunction( int score)
 +    {
 +        //-- register your score in highscore list --//
 +        ​
 +        PT_ScoreEntryStart.GameOverEnd(score);​
 +    }         
 +</​code>​