mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-26 06:09:02 +00:00
derp
This commit is contained in:
parent
df2c01b2ff
commit
c44e33c556
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
|
|
@ -7,6 +7,12 @@
|
||||||
"type": "lime",
|
"type": "lime",
|
||||||
"request": "launch"
|
"request": "launch"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Debug",
|
||||||
|
"type": "lime",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// Launch in browser
|
// Launch in browser
|
||||||
"name": "HTML5 Debug",
|
"name": "HTML5 Debug",
|
||||||
|
|
|
||||||
2
assets
2
assets
|
|
@ -1 +1 @@
|
||||||
Subproject commit d094640f727a670a348b3579d11af5ff6a2ada3a
|
Subproject commit b2f8b6a780316959d0a79adc6dbf61f9e4ca675f
|
||||||
|
|
@ -373,7 +373,13 @@ class Conductor
|
||||||
*/
|
*/
|
||||||
public function getTimeWithDiff():Float
|
public function getTimeWithDiff():Float
|
||||||
{
|
{
|
||||||
return this.songPosition + (Std.int(Timer.stamp() * 1000) - prevTimestamp);
|
// trace(this.songPosition);
|
||||||
|
|
||||||
|
@:privateAccess
|
||||||
|
this.songPosition = FlxG.sound.music._channel.position;
|
||||||
|
// return this.songPosition + (Std.int(Timer.stamp() * 1000) - prevTimestamp);
|
||||||
|
// trace("\t--> " + this.songPosition);
|
||||||
|
return this.songPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mapTimeChanges(songTimeChanges:Array<SongTimeChange>)
|
public function mapTimeChanges(songTimeChanges:Array<SongTimeChange>)
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,9 @@ class LatencyState extends MusicBeatSubState
|
||||||
FlxG.addChildBelowMouse(realStats);
|
FlxG.addChildBelowMouse(realStats);
|
||||||
|
|
||||||
PreciseInputManager.instance.onInputPressed.add(function(event:PreciseInputEvent) {
|
PreciseInputManager.instance.onInputPressed.add(function(event:PreciseInputEvent) {
|
||||||
|
generateBeatStuff(event);
|
||||||
strumLine.pressKey(event.noteDirection);
|
strumLine.pressKey(event.noteDirection);
|
||||||
strumLine.playPress(event.noteDirection);
|
strumLine.playPress(event.noteDirection);
|
||||||
generateBeatStuff(event);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
PreciseInputManager.instance.onInputReleased.add(function(event:PreciseInputEvent) {
|
PreciseInputManager.instance.onInputReleased.add(function(event:PreciseInputEvent) {
|
||||||
|
|
@ -80,14 +80,6 @@ class LatencyState extends MusicBeatSubState
|
||||||
diffGrp = new FlxTypedGroup<FlxText>();
|
diffGrp = new FlxTypedGroup<FlxText>();
|
||||||
add(diffGrp);
|
add(diffGrp);
|
||||||
|
|
||||||
// var musSpec:PolygonSpectogram = new PolygonSpectogram(FlxG.sound.music, FlxColor.RED, FlxG.height, Math.floor(FlxG.height / 2));
|
|
||||||
// musSpec.x += 170;
|
|
||||||
// musSpec.scrollFactor.set();
|
|
||||||
// musSpec.waveAmplitude = 100;
|
|
||||||
// musSpec.realtimeVisLenght = 0.45;
|
|
||||||
// // musSpec.visType = FREQUENCIES;
|
|
||||||
// add(musSpec);
|
|
||||||
|
|
||||||
for (beat in 0...Math.floor(FlxG.sound.music.length / (Conductor.instance.stepLengthMs * 2)))
|
for (beat in 0...Math.floor(FlxG.sound.music.length / (Conductor.instance.stepLengthMs * 2)))
|
||||||
{
|
{
|
||||||
var beatTick:FlxSprite = new FlxSprite(songPosToX(beat * (Conductor.instance.stepLengthMs * 2)), FlxG.height - 15);
|
var beatTick:FlxSprite = new FlxSprite(songPosToX(beat * (Conductor.instance.stepLengthMs * 2)), FlxG.height - 15);
|
||||||
|
|
@ -178,7 +170,7 @@ class LatencyState extends MusicBeatSubState
|
||||||
|
|
||||||
Conductor.instance.update();
|
Conductor.instance.update();
|
||||||
|
|
||||||
funnyStatsGraph.update(Conductor.instance.songPosition % 500);
|
funnyStatsGraph.update(swagSong.getTimeWithDiff() % 500);
|
||||||
realStats.update(Conductor.instance.getTimeWithDiff() % 500);
|
realStats.update(Conductor.instance.getTimeWithDiff() % 500);
|
||||||
|
|
||||||
// Conductor.instance.songPosition += (Timer.stamp() * 1000) - FlxG.sound.music.prevTimestamp;
|
// Conductor.instance.songPosition += (Timer.stamp() * 1000) - FlxG.sound.music.prevTimestamp;
|
||||||
|
|
@ -266,7 +258,7 @@ class LatencyState extends MusicBeatSubState
|
||||||
beatTrail.x = songPosVis.x;
|
beatTrail.x = songPosVis.x;
|
||||||
|
|
||||||
diffGrp.members[closestBeat].text = getDiff + "ms";
|
diffGrp.members[closestBeat].text = getDiff + "ms";
|
||||||
offsetsPerBeat[closestBeat] = Std.int(getDiff);
|
offsetsPerBeat[closestBeat] = Math.round(getDiff);
|
||||||
}
|
}
|
||||||
|
|
||||||
function songPosToX(pos:Float):Float
|
function songPosToX(pos:Float):Float
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue