Platforms now spawn when there's no count-in

This commit is contained in:
Rapandrasmus 2023-06-21 20:38:50 +02:00
parent 4f904c99c2
commit 5b95bd3290

View file

@ -1,3 +1,4 @@
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
@ -27,13 +28,18 @@ namespace HeavenStudio.Games.Scripts_AgbNightWalk
for (int i = 0; i < platformCount; i++) for (int i = 0; i < platformCount; i++)
{ {
AgbPlatform platform = Instantiate(platformRef, transform); 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); platform.gameObject.SetActive(true);
} }
} }
else 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);
}
} }
} }
} }