protected void PlayAbilitySound(GameObject gameObjectTarget) { var abilitySound = config.GetRandomAudioClip(); var audioSource = gameObjectTarget.GetComponent <AudioSource>(); audioSource.PlayOneShot(abilitySound); }
protected void PlayAbilitySound() { var abilitySound = config.GetRandomAudioClip(); var audioSource = GetComponent <AudioSource>(); audioSource.clip = abilitySound; audioSource.Play(); }