mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-17 20:32:53 +00:00
31 lines
693 B
Haxe
31 lines
693 B
Haxe
package;
|
|
|
|
/**
|
|
* ...
|
|
* @author
|
|
*/
|
|
class Conductor
|
|
{
|
|
public static var bpm:Int = 100;
|
|
public static var crochet:Float = ((60 / bpm) * 1000); // beats in milliseconds
|
|
public static var stepCrochet:Float = crochet / 4; // steps in milliseconds
|
|
public static var songPosition:Float;
|
|
public static var lastSongPos:Float;
|
|
public static var offset:Float = 0;
|
|
|
|
public static var safeFrames:Int = 10;
|
|
public static var safeZoneOffset:Float = (safeFrames / 60) * 1000; // is calculated in create(), is safeFrames in milliseconds
|
|
|
|
public function new()
|
|
{
|
|
}
|
|
|
|
public static function changeBPM(newBpm:Int)
|
|
{
|
|
bpm = newBpm;
|
|
|
|
crochet = ((60 / bpm) * 1000);
|
|
stepCrochet = crochet / 4;
|
|
}
|
|
}
|