diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs b/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs index 1d7c94da8..d3085c500 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbNightWalk.cs @@ -339,8 +339,12 @@ namespace HeavenStudio.Games if (end.beat <= entity.beat) tempEnds.Add(end); } } - tempEnds.Sort((x, y) => x.beat.CompareTo(y.beat)); - double lastSwitchBeat = tempEnds[^1].beat; + double lastSwitchBeat = double.MinValue; + if (tempEnds.Count > 0) + { + tempEnds.Sort((x, y) => x.beat.CompareTo(y.beat)); + lastSwitchBeat = tempEnds[^1].beat; + } double countInBeat = double.MinValue; float countInLength = 0; FindCountInBeatAndLength(lastSwitchBeat, ref countInBeat, ref countInLength); @@ -400,6 +404,7 @@ namespace HeavenStudio.Games public static void PlayRollCue(double beat, RiqEntity entity) { if (!IsValidRollCue(entity)) return; + Debug.Log("played roll sound"); MultiSound.Play(new MultiSound.Sound[] { new MultiSound.Sound("games/nightWalkRvl/highJump1", beat - 1), diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbStarHandler.cs b/Assets/Scripts/Games/NightWalkAgb/AgbStarHandler.cs index c4aedb35b..210c5210e 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbStarHandler.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbStarHandler.cs @@ -65,7 +65,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk { List nonEvolvedStars = currentStars.ToList().FindAll(x => x.evoStage == collectiveEvoStage); List onScreenStars = nonEvolvedStars.FindAll(x => x.transform.localPosition.x <= 17.77695f && x.transform.localPosition.x >= -17.77695f && x.transform.localPosition.y <= 10 && x.transform.localPosition.y >= -10); - Debug.Log("OnScreen: " + onScreenStars.Count + " nonEvolved: " + nonEvolvedStars.Count); + //Debug.Log("OnScreen: " + onScreenStars.Count + " nonEvolved: " + nonEvolvedStars.Count); if (onScreenStars.Count > 0) { AgbStar randomStar = onScreenStars[UnityEngine.Random.Range(0, onScreenStars.Count)];