From 5b95bd32909a421d019deeb59f94f5b7b6c3506c Mon Sep 17 00:00:00 2001 From: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Date: Wed, 21 Jun 2023 20:38:50 +0200 Subject: [PATCH] Platforms now spawn when there's no count-in --- .../Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs b/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs index 16cdc7614..794934640 100644 --- a/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs +++ b/Assets/Scripts/Games/NightWalkAgb/AgbPlatformHandler.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -27,13 +28,18 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk for (int i = 0; i < platformCount; i++) { AgbPlatform platform = Instantiate(platformRef, transform); - platform.Init(game.countInBeat + i - (platformCount * 0.5), game.countInBeat + i + 8, this); + platform.Init(game.countInBeat + i + 8 - (platformCount * 0.5), game.countInBeat + i + 8, this); platform.gameObject.SetActive(true); } } else { - + for (int i = 0; i < platformCount; i++) + { + AgbPlatform platform = Instantiate(platformRef, transform); + platform.Init(Math.Ceiling(beat) + i - (platformCount * 1.5), Math.Ceiling(beat) + i - platformCount, this); + platform.gameObject.SetActive(true); + } } } }