/// <summary> /// ノーツの判定処理 /// </summary> /// <param name="currentFlame"></param> /// <param name="judgeLane"></param> /// <param name="judgeData"></param> public JudgeType Judge(ref NotesType type, int currentFlame, int judgeLane, int deltaFlame, JudgeData judgeData) { JudgeType judgeResult = JudgeType.None; if (nextNotes[judgeLane] == null) { if (ButtonDownInput(judgeLane)) { SetLaneBeamColor(judgeLane, beamColor.noneColor); } return(judgeResult); } int differenceFlame = nextNotes[judgeLane].TimingFlame - currentFlame; int endDifferenceFlame = 0; type = nextNotes[judgeLane].Type; switch (type) { case NotesType.Normal: judgeResult = NormalNoteJudge(differenceFlame, judgeLane, judgeData); break; case NotesType.Hold: HoldNotes holdNotes = (HoldNotes)nextNotes[judgeLane]; endDifferenceFlame = holdNotes.EndTimingFlame - currentFlame; judgeResult = HoldNoteJudge(differenceFlame, endDifferenceFlame, judgeLane, deltaFlame, judgeData); break; case NotesType.Barrage: BarrageNotes barrageNotes = (BarrageNotes)nextNotes[judgeLane]; endDifferenceFlame = barrageNotes.EndTimingFlame - currentFlame; judgeResult = BarrageNoteJudge(differenceFlame, endDifferenceFlame, judgeLane, judgeData); break; } return(judgeResult); }
public JudgeType BarrageNoteJudge(int differenceFrame, int endDifferenceFlame, int judgeLane, JudgeData judgeData) { BarrageNotes judgeNotes = (BarrageNotes)nextNotes[judgeLane]; JudgeType judgeResult = JudgeType.None; int currentCount = judgeNotes.CurrentCount; if (differenceFrame <= 0) { bool isPush = false; if (targetBarrageCount <= 0) { targetBarrageCount = currentCount; judgeNotes.SetLineMaterial(lineMaterials[(int)LineMaterialType.Shiny]); } if (StaticValue.isAuto) { if (autoBarrageTime <= 0) { isPush = true; autoBarrageTime += autoBarrageInterval; } else { autoBarrageTime -= Time.deltaTime; } } else { isPush = ButtonDownInput(judgeLane); } if (isPush) { currentCount--; judgeNotes.CurrentCount = currentCount; particleController.PlayParticle(judgeLineTrans[judgeLane], 0); targetBarrageCount = currentCount; PlayTapSE(NotesType.Barrage, 0); } } if (currentCount <= 0) { judgeResult = JudgeType.Just; judgeNotes.SetLineMaterial(lineMaterials[(int)LineMaterialType.Dark]); SetNextNote(judgeLane); particleController.ShowJudgeText(judgeLineTrans[judgeLane], judgeData.judges[(int)JudgeType.Just].sprite); particleController.PlayParticle(judgeLineTrans[judgeLane], (int)judgeResult); cookpitCameraAnim.SetTrigger("MashShake"); PlayTapSE(NotesType.Barrage, -1); return(judgeResult); } if (endDifferenceFlame <= 0) { SetNextNote(judgeLane); judgeResult = JudgeType.Miss; particleController.ShowJudgeText(judgeLineTrans[judgeLane], judgeData.judges[(int)JudgeType.Miss].sprite); targetBarrageCount = -1; return(judgeResult); } return(judgeResult); }