Merge branch 'master' into master

This commit is contained in:
Cameron Taylor
2020-11-25 00:22:22 -08:00
committed by GitHub
7 changed files with 30 additions and 11 deletions

View File

@ -10,14 +10,17 @@ class Highscore
public static var songScores:Map<String, Int> = new Map<String, Int>();
#end
public static function saveScore(song:String, score:Int = 0, ?diff:Int = 0):Void
{
var daSong:String = formatSong(song, diff);
#if !switch
NGio.postScore(score, song);
#end
if (songScores.exists(daSong))
{
if (songScores.get(daSong) < score)
@ -29,10 +32,12 @@ class Highscore
public static function saveWeekScore(week:Int = 1, score:Int = 0, ?diff:Int = 0):Void
{
#if !switch
NGio.postScore(score, "Week " + week);
#end
var daWeek:String = formatSong('week' + week, diff);
if (songScores.exists(daWeek))