mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-22 09:59:25 +00:00
high score manipulation
This commit is contained in:
parent
09b4c62d7e
commit
e3a4f11d1e
|
@ -10,6 +10,7 @@
|
||||||
<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
|
<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
|
||||||
or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"-->
|
or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"-->
|
||||||
<!-- <app preloader="Preloader" resizable="true" /> -->
|
<!-- <app preloader="Preloader" resizable="true" /> -->
|
||||||
|
<app preloader="flixel.system.FlxPreloader" />
|
||||||
|
|
||||||
<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2-->
|
<!--Minimum without FLX_NO_GAMEPAD: 11.8, without FLX_NO_NATIVE_CURSOR: 11.2-->
|
||||||
<set name="SWF_VERSION" value="11.8" />
|
<set name="SWF_VERSION" value="11.8" />
|
||||||
|
|
|
@ -97,7 +97,8 @@ class ChartingState extends MusicBeatState
|
||||||
player1: 'bf',
|
player1: 'bf',
|
||||||
player2: 'dad',
|
player2: 'dad',
|
||||||
sectionLengths: [],
|
sectionLengths: [],
|
||||||
speed: 1
|
speed: 1,
|
||||||
|
validScore: false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -853,9 +853,12 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
canPause = false;
|
canPause = false;
|
||||||
|
|
||||||
#if !switch
|
if (SONG.validScore)
|
||||||
Highscore.saveScore(SONG.song, songScore, storyDifficulty);
|
{
|
||||||
#end
|
#if !switch
|
||||||
|
Highscore.saveScore(SONG.song, songScore, storyDifficulty);
|
||||||
|
#end
|
||||||
|
}
|
||||||
|
|
||||||
if (isStoryMode)
|
if (isStoryMode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,7 @@ typedef SwagSong =
|
||||||
|
|
||||||
var player1:String;
|
var player1:String;
|
||||||
var player2:String;
|
var player2:String;
|
||||||
|
var validScore:Bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Song
|
class Song
|
||||||
|
@ -49,7 +50,6 @@ class Song
|
||||||
|
|
||||||
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
|
public static function loadFromJson(jsonInput:String, ?folder:String):SwagSong
|
||||||
{
|
{
|
||||||
|
|
||||||
var rawJson = Assets.getText('assets/data/' + folder.toLowerCase() + '/' + jsonInput.toLowerCase() + '.json').trim();
|
var rawJson = Assets.getText('assets/data/' + folder.toLowerCase() + '/' + jsonInput.toLowerCase() + '.json').trim();
|
||||||
|
|
||||||
while (!rawJson.endsWith("}"))
|
while (!rawJson.endsWith("}"))
|
||||||
|
@ -59,6 +59,7 @@ class Song
|
||||||
}
|
}
|
||||||
|
|
||||||
var swagShit:SwagSong = cast Json.parse(rawJson).song;
|
var swagShit:SwagSong = cast Json.parse(rawJson).song;
|
||||||
|
swagShit.validScore = true;
|
||||||
trace(swagShit.notes[0]);
|
trace(swagShit.notes[0]);
|
||||||
|
|
||||||
// FIX THE CASTING ON WINDOWS/NATIVE
|
// FIX THE CASTING ON WINDOWS/NATIVE
|
||||||
|
|
Loading…
Reference in a new issue