From ae3a07e9cd7ff325634553351e8065c09cc2b3e1 Mon Sep 17 00:00:00 2001 From: Nic0Nic0Nii Date: Fri, 8 Oct 2021 00:08:26 +0000 Subject: [PATCH] Implement active/inactive note system. Co-authored-by: sigonasr2 --- .vscode/settings.json | 3 +++ LLSIG/.classpath | 2 +- LLSIG/.settings/org.eclipse.jdt.core.prefs | 6 +++--- LLSIG/pom.xml | 4 ++-- LLSIG/src/main/java/LLSIG/LLSIG.java | 3 +++ LLSIG/src/main/java/LLSIG/Lane.java | 21 +++++++++++++++++---- LLSIG/src/main/java/LLSIG/Note.java | 1 + 7 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e0f15db --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "automatic" +} \ No newline at end of file diff --git a/LLSIG/.classpath b/LLSIG/.classpath index 9e53fd3..5589358 100644 --- a/LLSIG/.classpath +++ b/LLSIG/.classpath @@ -1,6 +1,6 @@ - + diff --git a/LLSIG/.settings/org.eclipse.jdt.core.prefs b/LLSIG/.settings/org.eclipse.jdt.core.prefs index b33f257..ea7a397 100644 --- a/LLSIG/.settings/org.eclipse.jdt.core.prefs +++ b/LLSIG/.settings/org.eclipse.jdt.core.prefs @@ -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 diff --git a/LLSIG/pom.xml b/LLSIG/pom.xml index 2e8dd0e..10bfee0 100644 --- a/LLSIG/pom.xml +++ b/LLSIG/pom.xml @@ -14,8 +14,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/LLSIG/src/main/java/LLSIG/LLSIG.java b/LLSIG/src/main/java/LLSIG/LLSIG.java index 666c35c..953769e 100644 --- a/LLSIG/src/main/java/LLSIG/LLSIG.java +++ b/LLSIG/src/main/java/LLSIG/LLSIG.java @@ -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. } } diff --git a/LLSIG/src/main/java/LLSIG/Lane.java b/LLSIG/src/main/java/LLSIG/Lane.java index fbb9516..3ce50c4 100644 --- a/LLSIG/src/main/java/LLSIG/Lane.java +++ b/LLSIG/src/main/java/LLSIG/Lane.java @@ -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