void Update() { if (Time.time - timestamp > durationBetweenSpawn) { if (!isGameFinished) { SpawnCacoon(); timestamp = Time.time; } } }