new chart editor, sm file support, bpm changes, and scroll speed changes.
This commit is contained in:
@@ -28,8 +28,6 @@ class Conductor
|
||||
public static var safeZoneOffset:Float = Math.floor((safeFrames / 60) * 1000); // is calculated in create(), is safeFrames in milliseconds
|
||||
public static var timeScale:Float = Conductor.safeZoneOffset / 166;
|
||||
|
||||
public static var lengthInSteps:Float = 0;
|
||||
|
||||
public static var bpmChangeMap:Array<BPMChangeEvent> = [];
|
||||
|
||||
public function new()
|
||||
@@ -70,15 +68,27 @@ class Conductor
|
||||
trace("new BPM map BUDDY " + bpmChangeMap);
|
||||
}
|
||||
|
||||
public static function changeBPM(newBpm:Float)
|
||||
public static function recalculateTimingStruct(SONG:Song)
|
||||
{
|
||||
for(i in SONG.eventObjects)
|
||||
{
|
||||
/*TimingStruct.addTiming(beat,bpm,endBeat, Std.parseFloat(OFFSET));
|
||||
|
||||
if (changeEvents.length != 0)
|
||||
{
|
||||
var data = TimingStruct.AllTimings[currentIndex - 1];
|
||||
data.endBeat = beat;
|
||||
data.length = (data.endBeat - data.startBeat) / (data.bpm / 60);
|
||||
TimingStruct.AllTimings[currentIndex].startTime = data.startTime + data.length;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
public static function changeBPM(newBpm:Float, ?recalcLength = true)
|
||||
{
|
||||
bpm = newBpm;
|
||||
|
||||
crochet = ((60 / bpm) * 1000);
|
||||
stepCrochet = crochet / 4;
|
||||
|
||||
lengthInSteps = (FlxG.sound.music.length / stepCrochet);
|
||||
|
||||
trace("\nLength in in steps: " + lengthInSteps);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user