Example #1
0
    public virtual IEnumerator Die()
    {
        alive = false;
        soundSource.PlayOneShot(soundLibrary.GetRandomDeathSound());
        yield return(new WaitForSeconds(2f));

        Destroy(this.gameObject);
    }
Example #2
0
 public override void Die()
 {
     soundSource.PlayOneShot(soundLibrary.GetRandomDeathSound());
     base.Die();
 }