Working on hold note indicators

main
Joshua Sigona 3 years ago
parent 7554a765c3
commit 3ca3168f30
  1. 9
      LLSIG/src/main/java/LLSIG/LLSIG.java
  2. 13
      LLSIG/src/main/java/LLSIG/Lane.java
  3. 1
      LLSIG/src/main/java/LLSIG/Note.java

@ -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,7 +51,11 @@ public class Lane{
addNote(n,false);
}
public void addNote(Note n,boolean performReorderingOfList) {
if (performReorderingOfList) {
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);
@ -62,11 +68,10 @@ public class Lane{
if (!added) {
noteChart.add(n);
}
} else {
noteChart.add(n);
}
System.out.println("Note added: "+n);
}
addQueue.clear();
}
public void markMissedNotes() {
if (LLSIG.game.PLAYING) {
noteChart.forEach((note)->{

@ -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…
Cancel
Save