void OnDisable() { if (over) { progress.AddPts(nbPts * (difficulty + 1)); } else { GameObject button = GameObject.Find("MinigamesCanvas"); AudioSource audioSource = button.GetComponent <AudioSource>(); audioSource.PlayOneShot(Oh); } }
void OnDisable() { if (over) { progress.AddPts(nbPts * (difficulty + 1)); } else { GameObject button = GameObject.Find("MinigamesCanvas"); AudioSource audioSource = button.GetComponent <AudioSource>(); audioSource.PlayOneShot(Oh); } }