// Update is called once per frame void Update() { if (Input.GetKeyDown("space")) { if (inTheHole) { audio.PlayOneShot(thump); if (struggles == thenBreak) { breaking.Play(); net.Break(); struggles = 0; } else { struggles++; } } } }