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