Make order and plant counter on go when actually playing

This commit is contained in:
BuyMyMojo 2023-03-04 10:14:08 +11:00
parent a4d3abfb89
commit 478b208c90
5 changed files with 35 additions and 28 deletions

View file

@ -18,7 +18,10 @@ public class PlatesCounter : BaseCounter
private void Update()
{
spawnPlateTimer += Time.deltaTime;
if (GameStateManager.Instace.IsGamePlaying())
{
spawnPlateTimer += Time.deltaTime;
}
if (spawnPlateTimer > spawnPlateTimerMax)
{
spawnPlateTimer = 0f;

View file

@ -29,7 +29,11 @@ public class DeliveryManager : MonoBehaviour
private void Update()
{
if (GameStateManager.Instace.IsGamePlaying())
{
spawnRecipeTimer -= Time.deltaTime;
}
if (spawnRecipeTimer <= 0f)
{
spawnRecipeTimer = spawnRecipeTimerMax;