Rearrange core loop.
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
6f20bee15b
commit
a1d251cf6f
@ -139,6 +139,7 @@ public class LLSIG implements KeyListener{
|
||||
while (true) {
|
||||
long startTime = System.nanoTime();
|
||||
frameCount++;
|
||||
canvas.update();
|
||||
if (PLAYING&&EDITOR) {
|
||||
if (!musicPlayer.isPaused()) {
|
||||
EDITOR_CURSOR_BEAT = (musicPlayer.getPlayPosition()-offset)/beatDelay;
|
||||
@ -159,9 +160,15 @@ public class LLSIG implements KeyListener{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
canvas.update();
|
||||
} else
|
||||
if (PLAYING) {
|
||||
for (int i=0;i<9;i++) {
|
||||
Lane l =lanes.get(i);
|
||||
l.markMissedNotes();
|
||||
/*if (!EDITMODE) {
|
||||
l.clearOutInactiveNotes();
|
||||
}*/
|
||||
}
|
||||
for (BeatTiming bt : timings) {
|
||||
if (bt.active&&musicPlayer.getPlayPosition()>=bt.offset&&bt.offset>offset) {
|
||||
bt.active=false;
|
||||
@ -185,13 +192,6 @@ public class LLSIG implements KeyListener{
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i=0;i<9;i++) {
|
||||
Lane l =lanes.get(i);
|
||||
l.markMissedNotes();
|
||||
/*if (!EDITMODE) {
|
||||
l.clearOutInactiveNotes();
|
||||
}*/
|
||||
}
|
||||
window.repaint();
|
||||
long endTime = System.nanoTime();
|
||||
long diff = endTime-startTime;
|
||||
|
Loading…
x
Reference in New Issue
Block a user