From aab89a124f29ce17fdf521ab48a1f161d3fc8e75 Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Sun, 25 Jun 2023 02:01:07 +0200 Subject: [PATCH] Fixed stars not stopping + upped amount of stars --- Assets/Resources/Games/nightWalkAgb.prefab | 2 +- Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Resources/Games/nightWalkAgb.prefab b/Assets/Resources/Games/nightWalkAgb.prefab index 96500727d..f79756f73 100644 --- a/Assets/Resources/Games/nightWalkAgb.prefab +++ b/Assets/Resources/Games/nightWalkAgb.prefab @@ -849,7 +849,7 @@ MonoBehaviour: starRef: {fileID: -5335075775997835892, guid: 8df651ffe21e1dc4fb223e94fdc9f9cb, type: 3} boundaryX: 23 boundaryY: 13 - starCount: 80 + starCount: 100 blinkFrequency: 0.125 blinkAmount: 5 --- !u!1 &5576704226004728173 diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs b/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs index 0f34fcde6..c235a5008 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs @@ -26,6 +26,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk [NonSerialized] public List allPlatforms = new(); private int lastHeightUnits; private int currentHeightUnits; + private bool stopStars; private void Awake() { @@ -81,7 +82,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk transform.localPosition = new Vector3(0, -newPosY, 0); starHandler.normalizedY = -func(starHeight * lastHeightUnits, starHeight * currentHeightUnits, normalizedBeat); } - + if (stopStars) return; float normalizedValue = cond.GetPositionFromBeat(0, starLength); starHandler.normalizedX = -normalizedValue; @@ -94,6 +95,7 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk { platform.Stop(); } + stopStars = true; } public bool PlatformsStopped()