private void OnDestroy() { if (!LevelTimer.isGameOver) { levelTimer.GetComponent <LevelTimer>().currentPickup++; var cameraPosition = GameObject.FindGameObjectWithTag("MainCamera").transform.position; AudioSource.PlayClipAtPoint(pickup, cameraPosition); if (levelTimer.GetComponent <LevelTimer>().currentPickup >= levelTimer.GetComponent <LevelTimer>().originalPickupCount) { levelTimer.GetComponent <LevelTimer>().LevelWon(); } } }