some fixes
This commit is contained in:
parent
d621d1dc52
commit
98e96e4348
@ -11,6 +11,23 @@ import haxe.Json;
|
|||||||
import flixel.input.keyboard.FlxKey;
|
import flixel.input.keyboard.FlxKey;
|
||||||
import openfl.utils.Dictionary;
|
import openfl.utils.Dictionary;
|
||||||
|
|
||||||
|
class Ana
|
||||||
|
{
|
||||||
|
public var hitTime:Float;
|
||||||
|
public var nearestNote:Array<Dynamic>;
|
||||||
|
public var hit:Bool;
|
||||||
|
public var hitJudge:String;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Analysis
|
||||||
|
{
|
||||||
|
public var anaArray:Array<Ana>;
|
||||||
|
|
||||||
|
public function new() {
|
||||||
|
anaArray = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
typedef ReplayJSON =
|
typedef ReplayJSON =
|
||||||
{
|
{
|
||||||
public var replayGameVer:String;
|
public var replayGameVer:String;
|
||||||
@ -18,9 +35,11 @@ typedef ReplayJSON =
|
|||||||
public var songName:String;
|
public var songName:String;
|
||||||
public var songDiff:Int;
|
public var songDiff:Int;
|
||||||
public var songNotes:Array<Dynamic>;
|
public var songNotes:Array<Dynamic>;
|
||||||
|
public var songJudgements:Array<String>;
|
||||||
public var noteSpeed:Float;
|
public var noteSpeed:Float;
|
||||||
public var isDownscroll:Bool;
|
public var isDownscroll:Bool;
|
||||||
public var sf:Int;
|
public var sf:Int;
|
||||||
|
public var ana:Analysis;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Replay
|
class Replay
|
||||||
@ -40,7 +59,9 @@ class Replay
|
|||||||
songNotes: [],
|
songNotes: [],
|
||||||
replayGameVer: version,
|
replayGameVer: version,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
sf: Conductor.safeFrames
|
sf: Conductor.safeFrames,
|
||||||
|
ana: new Analysis(),
|
||||||
|
songJudgements: []
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +76,7 @@ class Replay
|
|||||||
return rep;
|
return rep;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function SaveReplay(notearray:Array<Dynamic>)
|
public function SaveReplay(notearray:Array<Dynamic>, judge:Array<String>)
|
||||||
{
|
{
|
||||||
var json = {
|
var json = {
|
||||||
"songName": PlayState.SONG.song,
|
"songName": PlayState.SONG.song,
|
||||||
@ -63,9 +84,11 @@ class Replay
|
|||||||
"noteSpeed": (FlxG.save.data.scrollSpeed > 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed),
|
"noteSpeed": (FlxG.save.data.scrollSpeed > 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed),
|
||||||
"isDownscroll": FlxG.save.data.downscroll,
|
"isDownscroll": FlxG.save.data.downscroll,
|
||||||
"songNotes": notearray,
|
"songNotes": notearray,
|
||||||
|
"songJudgements": judge,
|
||||||
"timestamp": Date.now(),
|
"timestamp": Date.now(),
|
||||||
"replayGameVer": version,
|
"replayGameVer": version,
|
||||||
"sf": Conductor.safeFrames
|
"sf": Conductor.safeFrames,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var data:String = Json.stringify(json);
|
var data:String = Json.stringify(json);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user