public void GetHit() { Debug.Log("gothit"); sound.PlayEfxRandom(hitSfx); //lose hp, then be destroyed hitpoints -= 1; if (hitpoints <= 0) { Destroy(this.transform.parent.gameObject); } }
public void PlaySFX(string sfx) { personalSoundManager.PlayEfxRandom(dictOfClips[sfx]); }