mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-21 09:29:41 +00:00
Target the current time change rather than the first one.
This commit is contained in:
parent
21b79c0b83
commit
99ed8b94d7
|
@ -35,15 +35,15 @@ class Conductor
|
|||
static var timeChanges:Array<SongTimeChange> = [];
|
||||
|
||||
/**
|
||||
* The current time change.
|
||||
* The most recent time change for the current song position.
|
||||
*/
|
||||
static var currentTimeChange:SongTimeChange;
|
||||
public static var currentTimeChange(default, null):SongTimeChange;
|
||||
|
||||
/**
|
||||
* The current position in the song in milliseconds.
|
||||
* Updated every frame based on the audio position.
|
||||
* Update this every frame based on the audio position using `Conductor.update()`.
|
||||
*/
|
||||
public static var songPosition:Float = 0;
|
||||
public static var songPosition(default, null):Float = 0;
|
||||
|
||||
/**
|
||||
* Beats per minute of the current song at the current time.
|
||||
|
|
|
@ -2103,13 +2103,13 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
}
|
||||
else
|
||||
{
|
||||
currentSongMetadata.timeChanges[0].bpm += 1;
|
||||
Conductor.currentTimeChange.bpm += 1;
|
||||
refreshMetadataToolbox();
|
||||
}
|
||||
}
|
||||
|
||||
playbarBPM.onRightClick = _ -> {
|
||||
currentSongMetadata.timeChanges[0].bpm -= 1;
|
||||
Conductor.currentTimeChange.bpm -= 1;
|
||||
refreshMetadataToolbox();
|
||||
}
|
||||
|
||||
|
@ -4001,7 +4001,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
|||
|
||||
playbarNoteSnap.text = '1/${noteSnapQuant}';
|
||||
playbarDifficulty.text = "Difficulty: " + selectedDifficulty.toTitleCase();
|
||||
playbarBPM.text = "BPM: " + currentSongMetadata.timeChanges[0].bpm;
|
||||
playbarBPM.text = "BPM: " + Conductor.currentTimeChange.bpm;
|
||||
}
|
||||
|
||||
function handlePlayhead():Void
|
||||
|
|
|
@ -267,7 +267,7 @@ class LatencyState extends MusicBeatSubState
|
|||
|
||||
function generateBeatStuff()
|
||||
{
|
||||
Conductor.songPosition = swagSong.getTimeWithDiff();
|
||||
Conductor.update(swagSong.getTimeWithDiff());
|
||||
|
||||
var closestBeat:Int = Math.round(Conductor.songPosition / Conductor.beatLengthMs) % diffGrp.members.length;
|
||||
var getDiff:Float = Conductor.songPosition - (closestBeat * Conductor.beatLengthMs);
|
||||
|
|
Loading…
Reference in a new issue