// Update is called once per frame void Update() { long musicTime = mainMusic.timeMillis(); if (prevTime != musicTime) { prevTime = musicTime; long songTime = timeMaster.GetTime() - startTime; long error = songTime - musicTime; startTime += error / 2; debugPanel.log("Drift", error.ToString()); } }
public void Restart() { pattern.startTime = timeMaster.GetTime() - rhythm.timeMillis(); playing = true; paused = false; }