void OnDifficultyChange() { ball.transform.position = ballSpawn.position; Time.timeScale = 0; drawScript.inkLimit = difficulties[difficultyIndex].y; drawScript.DeleteLine(); Destroy(currentBall); SpawnBall(); OnDrawChange(); drawScript.isDraw = true; Destroy(GameObject.FindGameObjectWithTag("Hazard")); Destroy(GameObject.FindGameObjectWithTag("Star")); bgRenderer.sprite = backgrounds[difficultyIndex + 1]; levelText.text = "Level " + (difficultyIndex + 2).ToString(); difficultyIndex++; }