private void FixedUpdate() { if (playerHealth.lose) { //gameState = false; scrollManager.StopScroll(); spawner.StopAllCoroutines(); Invoke("ShowEndCanvas", 1); } else { //gameState = true; scoreManager.AddDistance(); spawner.minInterval = 0.5f / scrollManager.speedMultiplier; } }