diff --git a/Assets/Scripts/AppInfo.cs b/Assets/Scripts/AppInfo.cs index 60ebab967..f2950c807 100644 --- a/Assets/Scripts/AppInfo.cs +++ b/Assets/Scripts/AppInfo.cs @@ -1,8 +1,8 @@ using System; public static class AppInfo { - public const string Version = "0.0.1017"; - public static readonly DateTime Date = new DateTime(2023, 11, 12, 04, 10, 42, 238, DateTimeKind.Utc); + public const string Version = "0.0.1018"; + public static readonly DateTime Date = new DateTime(2023, 12, 21, 03, 53, 15, 934, DateTimeKind.Utc); } diff --git a/Assets/Scripts/Conductor.cs b/Assets/Scripts/Conductor.cs index aec733b49..4cc47c74e 100644 --- a/Assets/Scripts/Conductor.cs +++ b/Assets/Scripts/Conductor.cs @@ -86,6 +86,7 @@ namespace HeavenStudio private float timelinePitch = 1f; private float minigamePitch = 1f; public float SongPitch { get => isPaused ? 0f : (timelinePitch * minigamePitch); } + public float TimelinePitch { get => timelinePitch; } private float musicScheduledPitch = 1f; private double musicScheduledTime = 0; @@ -95,6 +96,7 @@ namespace HeavenStudio public void SetTimelinePitch(float pitch) { + if (isPaused) return; if (pitch != 0 && pitch * minigamePitch != SongPitch) { Debug.Log("added pitch change " + pitch * minigamePitch + " at" + absTime); diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index 1195923de..cee01e3fd 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -718,6 +718,24 @@ namespace HeavenStudio if (miniGame != null) miniGame.OnPlay(beat); onPlay?.Invoke(beat); + + bool hasStartPerfect = false; + foreach (RiqEntity marker in Beatmap.SectionMarkers) + { + if (marker["startPerfect"]) + { + hasStartPerfect = true; + break; + } + } + + if (OverlaysManager.OverlaysEnabled && !hasStartPerfect) + { + if (PersistentDataManager.gameSettings.perfectChallengeType != PersistentDataManager.PerfectChallengeType.Off) + { + GoForAPerfect.instance.Enable(0); + } + } } else { diff --git a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs index 656c8eb65..aa1ba0e99 100644 --- a/Assets/Scripts/LevelEditor/Timeline/Timeline.cs +++ b/Assets/Scripts/LevelEditor/Timeline/Timeline.cs @@ -397,6 +397,8 @@ namespace HeavenStudio.Editor.Track MouseInTimeline = RectTransformUtility.RectangleContainsScreenPoint(TimelineScroll.viewport, Input.mousePosition, Editor.instance.EditorCamera); + PlaybackSpeed.interactable = !Conductor.instance.isPaused; + foreach (var rect in GameObject.FindGameObjectsWithTag("BlocksEditor")) { if (!rect.activeInHierarchy) continue; @@ -1113,15 +1115,30 @@ namespace HeavenStudio.Editor.Track const float SpeedSnap = 0.25f; public void SetPlaybackSpeed(float speed) { - float spd = Mathp.Round2Nearest(speed, SpeedSnap); - PlaybackSpeed.transform.GetChild(3).GetComponent().text = $"Playback Speed: {spd}x"; - Conductor.instance.SetTimelinePitch(spd); - PlaybackSpeed.value = spd; + if (Conductor.instance.isPaused) + { + float spd = Conductor.instance.TimelinePitch; + PlaybackSpeed.transform.GetChild(3).GetComponent().text = $"Playback Speed: {spd}x"; + PlaybackSpeed.value = spd; + } + else + { + float spd = Mathp.Round2Nearest(speed, SpeedSnap); + PlaybackSpeed.transform.GetChild(3).GetComponent().text = $"Playback Speed: {spd}x"; + Conductor.instance.SetTimelinePitch(spd); + PlaybackSpeed.value = spd; + } } public void ResetPlaybackSpeed() { - if (Input.GetMouseButton(1)) + if (Conductor.instance.isPaused) + { + float spd = Conductor.instance.TimelinePitch; + PlaybackSpeed.transform.GetChild(3).GetComponent().text = $"Playback Speed: {spd}x"; + PlaybackSpeed.value = spd; + } + else if (Input.GetMouseButton(1)) { PlaybackSpeed.transform.GetChild(3).GetComponent().text = $"Playback Speed: 1x"; PlaybackSpeed.value = 1f;