mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-28 07:56:46 +00:00
totalSteps & totalBeats synced with bpm changes
This commit is contained in:
parent
674a08b381
commit
f3462c2c99
|
@ -36,10 +36,14 @@ class MusicBeatState extends FlxUIState
|
|||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
everyStep();
|
||||
//everyStep();
|
||||
var oldStep:Int = curStep;
|
||||
|
||||
updateCurStep();
|
||||
// Needs to be FLOOR idk why it was rounded but that dont make sense
|
||||
|
||||
if (oldStep != curStep && curStep > 0)
|
||||
stepHit();
|
||||
|
||||
updateBeat();
|
||||
|
||||
super.update(elapsed);
|
||||
|
@ -50,21 +54,6 @@ class MusicBeatState extends FlxUIState
|
|||
curBeat = Math.floor(curStep / 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* CHECKS EVERY FRAME
|
||||
*/
|
||||
private function everyStep():Void
|
||||
{
|
||||
if (Conductor.songPosition > lastStep + Conductor.stepCrochet - Conductor.safeZoneOffset
|
||||
|| Conductor.songPosition < lastStep + Conductor.safeZoneOffset)
|
||||
{
|
||||
if (Conductor.songPosition > lastStep + Conductor.stepCrochet)
|
||||
{
|
||||
stepHit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function updateCurStep():Void
|
||||
{
|
||||
var lastChange:BPMChangeEvent = {
|
||||
|
|
|
@ -35,29 +35,19 @@ class MusicBeatSubstate extends FlxSubState
|
|||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
everyStep();
|
||||
//everyStep();
|
||||
var oldStep:Int = curStep;
|
||||
|
||||
updateCurStep();
|
||||
|
||||
if (oldStep != curStep && curStep > 0)
|
||||
stepHit();
|
||||
|
||||
curBeat = Math.floor(curStep / 4);
|
||||
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
||||
/**
|
||||
* CHECKS EVERY FRAME
|
||||
*/
|
||||
private function everyStep():Void
|
||||
{
|
||||
if (Conductor.songPosition > lastStep + Conductor.stepCrochet - Conductor.safeZoneOffset
|
||||
|| Conductor.songPosition < lastStep + Conductor.safeZoneOffset)
|
||||
{
|
||||
if (Conductor.songPosition > lastStep + Conductor.stepCrochet)
|
||||
{
|
||||
stepHit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function updateCurStep():Void
|
||||
{
|
||||
var lastChange:BPMChangeEvent = {
|
||||
|
|
|
@ -2261,7 +2261,6 @@ class PlayState extends MusicBeatState
|
|||
|
||||
override function beatHit()
|
||||
{
|
||||
wiggleShit.update(Conductor.crochet);
|
||||
super.beatHit();
|
||||
|
||||
if (generatedMusic)
|
||||
|
@ -2284,6 +2283,7 @@ class PlayState extends MusicBeatState
|
|||
dad.dance();
|
||||
}
|
||||
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
|
||||
wiggleShit.update(Conductor.crochet);
|
||||
|
||||
// HARDCODING FOR MILF ZOOMS!
|
||||
if (curSong.toLowerCase() == 'milf' && curBeat >= 168 && curBeat < 200 && camZooming && FlxG.camera.zoom < 1.35)
|
||||
|
|
Loading…
Reference in a new issue