Commit 5d59739a authored by 16이상민's avatar 16이상민

Modified judging machanism

parent fca95994
...@@ -29,13 +29,13 @@ namespace JudgeModule ...@@ -29,13 +29,13 @@ namespace JudgeModule
private string[] notenames private string[] notenames
= new string[] { "SBT", "LBT", "SMO", "LMO" }; = new string[] { "SBT", "LBT", "SMO", "LMO" };
public Note Current public Note CurrentBT
{ {
get get
{ {
float timing = 0; float timing = 0;
string type = null; string type = null;
foreach (var x in notenames) foreach (var x in new string[] { "SBT", "LBT" })
{ {
if (enables[x].Count == 0) if (enables[x].Count == 0)
continue; continue;
...@@ -46,13 +46,27 @@ namespace JudgeModule ...@@ -46,13 +46,27 @@ namespace JudgeModule
timing = enables[x][0].Instance.StartTiming; timing = enables[x][0].Instance.StartTiming;
} }
} }
return type == null ? null : enables[type][0].Instance;
}
}
if (type == null) public Note CurrentSMO
return null; {
return enables[type][0].Instance; get
{
return enables["SMO"].Count == 0 ? null : enables["SMO"][0].Instance;
} }
} }
public Note CurrentLMO
{
get
{
return enables["LMO"].Count == 0 ? null : enables["LMO"][0].Instance;
}
}
private float MsPerBeat private float MsPerBeat
{ {
get get
......
...@@ -143,7 +143,13 @@ public class InGameManager : MonoBehaviour ...@@ -143,7 +143,13 @@ public class InGameManager : MonoBehaviour
return; return;
} }
Note note = notemanager.Current; JudgeNote(notemanager.CurrentBT, timing);
JudgeNote(notemanager.CurrentSMO, timing);
JudgeNote(notemanager.CurrentLMO, timing);
}
private void JudgeNote(Note note, float timing)
{
if (note != null) if (note != null)
judgemanager.JudgeNote(note, timing); judgemanager.JudgeNote(note, timing);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment