From d1eff4a20db567a62ebc83d6a6722b4a9e547de0 Mon Sep 17 00:00:00 2001 From: Jenny Crowe Date: Mon, 21 Feb 2022 07:56:10 -0700 Subject: [PATCH] DJ School: Cue elegibility tweaks (autoplay should work correctly now) --- Assets/Scripts/Games/DJSchool/DJSchool.cs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/Games/DJSchool/DJSchool.cs b/Assets/Scripts/Games/DJSchool/DJSchool.cs index 86c6d14fa..3711e3c9f 100644 --- a/Assets/Scripts/Games/DJSchool/DJSchool.cs +++ b/Assets/Scripts/Games/DJSchool/DJSchool.cs @@ -113,17 +113,13 @@ namespace RhythmHeavenMania.Games.DJSchool BeatAction.New(djYellow, new List() { new BeatAction.Action(beat, delegate { djYellow.GetComponent().Play("BreakCmon", 0, 0); }), - new BeatAction.Action(beat + 1f, delegate { djYellow.GetComponent().Play("BreakCmon", 0, 0); }), + new BeatAction.Action(beat + 1f, delegate { djYellow.GetComponent().Play("BreakCmon", 0, 0); SetupCue(beat, false); }), new BeatAction.Action(beat + 2f, delegate { djYellow.GetComponent().Play("Hold", 0, 0); djYellowHolding = true; }), }); - - student.holdBeat = beat; - student.eligible = true; - student.ResetState(); } public void AndStop(float beat) @@ -139,17 +135,13 @@ namespace RhythmHeavenMania.Games.DJSchool BeatAction.New(djYellow, new List() { - new BeatAction.Action(beat + 0.5f, delegate { djYellow.GetComponent().Play("BreakCmon", 0, 0); }), + new BeatAction.Action(beat + 0.5f, delegate { djYellow.GetComponent().Play("BreakCmon", 0, 0); SetupCue(beat - 0.5f, false); }), new BeatAction.Action(beat + 1.5f, delegate { djYellow.GetComponent().Play("Hold", 0, 0); djYellowHolding = true; }), }); - - student.holdBeat = beat - 0.5f; - student.eligible = true; - student.ResetState(); } public void ScratchoHey(float beat, int type) @@ -181,15 +173,22 @@ namespace RhythmHeavenMania.Games.DJSchool BeatAction.New(djYellow, new List() { new BeatAction.Action(beat, delegate { djYellow.GetComponent().Play("Scratcho", 0, 0); }), - new BeatAction.Action(beat + 1f, delegate { djYellow.GetComponent().Play("Scratcho2", 0, 0); }), + new BeatAction.Action(beat + 1f, delegate { djYellow.GetComponent().Play("Scratcho2", 0, 0); SetupCue(beat, true); }), new BeatAction.Action(beat + 2.05f, delegate { djYellow.GetComponent().Play("Hey", 0, 0); djYellowHolding = false; }), }); + } - student.swipeBeat = beat; + void SetupCue(float beat, bool swipe) + { + if (swipe) + student.swipeBeat = beat; + else + student.holdBeat = beat; + student.eligible = true; student.ResetState(); }