Implement active/inactive note system.

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
Nic0Nic0Nii 3 years ago
parent e30a0cc1ed
commit ae3a07e9cd
  1. 3
      .vscode/settings.json
  2. 2
      LLSIG/.classpath
  3. 6
      LLSIG/.settings/org.eclipse.jdt.core.prefs
  4. 4
      LLSIG/pom.xml
  5. 3
      LLSIG/src/main/java/LLSIG/LLSIG.java
  6. 21
      LLSIG/src/main/java/LLSIG/Lane.java
  7. 1
      LLSIG/src/main/java/LLSIG/Note.java

@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>

@ -1,8 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@ -13,4 +13,4 @@ org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.8

@ -14,8 +14,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>

@ -58,6 +58,9 @@ public class LLSIG implements KeyListener{
for (int i=0;i<9;i++) {
if (lanePress[i]) {
lanePress[i]=false;
if (lanes.get(i).noteExists()) {
lanes.get(i).getNote()
}
//TODO Hit detection goes here.
}
}

@ -12,17 +12,30 @@ public class Lane{
public boolean endOfChart() {
return currentNoteIndex==noteChart.size()-1;
}
public void clearOutInactiveNotes() {
noteChart.removeIf(note->!note.active);
}
public boolean noteExists() {
return noteExists(0);
return getNote()!=null;
}
public boolean noteExists(int noteOffset) {
return currentNoteIndex+noteOffset<noteChart.size();
return getNote(noteOffset)!=null;
}
public Note getNote(int noteOffset) throws IndexOutOfBoundsException {
return noteChart.get(currentNoteIndex+noteOffset);
for (int i=noteOffset;i<noteChart.size();i++)
{
Note n = getNote(i);
if (n.active) {return n;}
}
return null;
}
public Note getNote() {
return getNote(0);
for (int i=0;i<noteChart.size();i++)
{
Note n = getNote(i);
if (n.active) {return n;}
}
return null;
}
public void addNote(Note n) {
addNote(n,false);

@ -3,6 +3,7 @@ package main.java.LLSIG;
public class Note {
NoteType type;
int start,end;
boolean active=true; //Set to false when the note has been scored.
public Note(NoteType type,int start,int end) {
this.type=type;
this.start=start;

Loading…
Cancel
Save