WEEK SCORE SHIT

This commit is contained in:
Cameron Taylor
2020-11-06 02:56:45 -08:00
parent 054e9f4bf9
commit cf7b871c56
5 changed files with 43 additions and 4 deletions

View File

@ -37,6 +37,7 @@ class PlayState extends MusicBeatState
public static var curLevel:String = 'Tutorial';
public static var SONG:SwagSong;
public static var isStoryMode:Bool = false;
public static var storyWeek:Int = 0;
public static var storyPlaylist:Array<String> = [];
public static var storyDifficulty:Int = 1;
@ -83,6 +84,8 @@ class PlayState extends MusicBeatState
var talking:Bool = true;
var songScore:Int = 0;
public static var campaignScore:Int = 0;
override public function create()
{
// var gameCam:FlxCamera = FlxG.camera;
@ -825,6 +828,8 @@ class PlayState extends MusicBeatState
if (isStoryMode)
{
campaignScore += songScore;
storyPlaylist.remove(storyPlaylist[0]);
if (storyPlaylist.length <= 0)
@ -836,6 +841,7 @@ class PlayState extends MusicBeatState
StoryMenuState.weekUnlocked[1] = true;
NGio.unlockMedal(60961);
Highscore.saveWeekScore(storyWeek, campaignScore, storyDifficulty);
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked;
FlxG.save.flush();