Working on hold note indicators
This commit is contained in:
parent
7554a765c3
commit
3ca3168f30
@ -52,7 +52,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{
|
||||
public boolean METRONOME = false;
|
||||
public boolean BPM_MEASURE = false;
|
||||
public boolean PLAYING = true; //Whether or not a song is loaded and playing.
|
||||
public boolean EDITOR = true; //Whether or not we are in beatmap editing mode.
|
||||
public boolean EDITOR = false; //Whether or not we are in beatmap editing mode.
|
||||
public boolean HOLDING_CTRL_KEY = false;
|
||||
|
||||
public static double EDITOR_CURSOR_BEAT = 0;
|
||||
@ -135,6 +135,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{
|
||||
window.add(canvas);
|
||||
window.setVisible(true);
|
||||
window.addKeyListener(this);
|
||||
window.addMouseWheelListener(this);
|
||||
|
||||
new Thread() {
|
||||
public void run(){
|
||||
@ -175,6 +176,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{
|
||||
l.clearOutInactiveNotes();
|
||||
}*/
|
||||
l.clearOutDeletedNotes();
|
||||
l.addFromQueue();
|
||||
}
|
||||
for (BeatTiming bt : timings) {
|
||||
if (bt.active&&musicPlayer.getPlayPosition()>=bt.offset&&bt.offset>offset) {
|
||||
@ -412,6 +414,8 @@ public class LLSIG implements KeyListener,MouseWheelListener{
|
||||
LLSIG.game.lanes.get(lane).addNote(n,true);
|
||||
LLSIG.game.lanes.get(lane).lastNoteAdded=n;
|
||||
l.keyPressed=true;
|
||||
clap.setFramePosition(0);
|
||||
clap.start();
|
||||
}
|
||||
}
|
||||
} else
|
||||
@ -508,6 +512,8 @@ public class LLSIG implements KeyListener,MouseWheelListener{
|
||||
lastNote.setNoteType(NoteType.HOLD);
|
||||
lastNote.setBeatSnapEnd(EDITOR_CURSOR_BEAT);
|
||||
lastNote.active2=false;
|
||||
clap.setFramePosition(0);
|
||||
clap.start();
|
||||
}
|
||||
}
|
||||
LLSIG.game.lanes.get(lane).keyPressed=false;
|
||||
@ -540,6 +546,7 @@ public class LLSIG implements KeyListener,MouseWheelListener{
|
||||
}
|
||||
}
|
||||
}
|
||||
keyState[lane]=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
package main.java.LLSIG;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Lane{
|
||||
List<Note> noteChart;
|
||||
List<Note> addQueue = new ArrayList<Note>();
|
||||
int currentNoteIndex = 0;
|
||||
TimingRating lastRating = TimingRating.MISS;
|
||||
double lastNote = -1;
|
||||
@ -49,23 +51,26 @@ public class Lane{
|
||||
addNote(n,false);
|
||||
}
|
||||
public void addNote(Note n,boolean performReorderingOfList) {
|
||||
if (performReorderingOfList) {
|
||||
boolean added=false;
|
||||
for (int i=0;i<noteChart.size();i++) {
|
||||
Note nn = noteChart.get(i);
|
||||
if (nn.start>n.start) {
|
||||
noteChart.add(i,n);
|
||||
added=true;
|
||||
break;
|
||||
addQueue.add(n);
|
||||
}
|
||||
|
||||
public void addFromQueue() {
|
||||
for (Note n : addQueue) {
|
||||
boolean added=false;
|
||||
for (int i=0;i<noteChart.size();i++) {
|
||||
Note nn = noteChart.get(i);
|
||||
if (nn.start>n.start) {
|
||||
noteChart.add(i,n);
|
||||
added=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!added) {
|
||||
noteChart.add(n);
|
||||
}
|
||||
} else {
|
||||
noteChart.add(n);
|
||||
if (!added) {
|
||||
noteChart.add(n);
|
||||
}
|
||||
System.out.println("Note added: "+n);
|
||||
}
|
||||
System.out.println("Note added: "+n);
|
||||
addQueue.clear();
|
||||
}
|
||||
public void markMissedNotes() {
|
||||
if (LLSIG.game.PLAYING) {
|
||||
|
@ -7,6 +7,7 @@ public class Note {
|
||||
boolean active2=false; //Set to false when the end section of the note has been scored.
|
||||
double beatSnapStart,beatSnapEnd = -1;
|
||||
boolean deleted=false; //Set this marker to delete it on the next frame (when using the editor)
|
||||
boolean multiple=false; //Whether or not to display an indicator showing this is a multi-press note.
|
||||
public Note(NoteType type,double start,double end) {
|
||||
this.type=type;
|
||||
this.start=start;
|
||||
|
Loading…
x
Reference in New Issue
Block a user