BPM map, trim off useless song stuff, adjust MILF cam zoom
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package;
|
||||
|
||||
import Conductor.BPMChangeEvent;
|
||||
import flixel.FlxG;
|
||||
import flixel.addons.transition.FlxTransitionableState;
|
||||
import flixel.addons.ui.FlxUIState;
|
||||
@ -38,7 +39,7 @@ class MusicBeatState extends FlxUIState
|
||||
everyStep();
|
||||
|
||||
updateCurStep();
|
||||
// Needs to be ROUNED, rather than ceil or floor
|
||||
// Needs to be FLOOR idk why it was rounded but that dont make sense
|
||||
updateBeat();
|
||||
|
||||
super.update(elapsed);
|
||||
@ -46,7 +47,7 @@ class MusicBeatState extends FlxUIState
|
||||
|
||||
private function updateBeat():Void
|
||||
{
|
||||
curBeat = Math.round(curStep / 4);
|
||||
curBeat = Math.floor(curStep / 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -66,7 +67,18 @@ class MusicBeatState extends FlxUIState
|
||||
|
||||
private function updateCurStep():Void
|
||||
{
|
||||
curStep = Math.floor(Conductor.songPosition / Conductor.stepCrochet);
|
||||
var lastChange:BPMChangeEvent = {
|
||||
stepTime: 0,
|
||||
songTime: 0,
|
||||
bpm: 0
|
||||
}
|
||||
for (i in 0...Conductor.bpmChangeMap.length)
|
||||
{
|
||||
if (Conductor.songPosition >= Conductor.bpmChangeMap[i].songTime)
|
||||
lastChange = Conductor.bpmChangeMap[i];
|
||||
}
|
||||
|
||||
curStep = lastChange.stepTime + Math.floor((Conductor.songPosition - lastChange.songTime) / Conductor.stepCrochet);
|
||||
}
|
||||
|
||||
public function stepHit():Void
|
||||
|
Reference in New Issue
Block a user