Ejemplo n.º 1
0
 public void stopAllSounds()
 {
     foreach (AudioSource AS in _audioSource)
     {
         AS.Stop();
     }
 }
Ejemplo n.º 2
0
    public void damage()
    {
        Health--;
        if (AS.isPlaying == false)
        {
            PlayAudios(0);
        }
        health       = Health;
        slider.value = health;
        if (Health < 1)
        {
            if (Dealth == false)
            {
                anim.SetTrigger("dealth");
                for (int i = 0; i < germs; i++)
                {
                    Instantiate(DiamondPrefab, this.transform.position + new Vector3(i, 0, 0), Quaternion.identity);
                }

                Destroy(this.gameObject, 2.0f);
                Destroy(slider.gameObject);
                AS.Stop();
                Dealth = true;
            }

            return;
        }
        anim.SetTrigger("hitted");
    }
Ejemplo n.º 3
0
 public void StopSound()
 {
     foreach (var AS in audioSources)
     {
         AS.Stop();
     }
     music_controller.StopSounds();
 }
 public void OnNarratorHit()
 {
     narratorHit.Play();
     if (co != null)
     StopCoroutine(co);
     foreach (AudioSource AS in enemyDeathAnnouncement)
     {
         if (AS.isPlaying)
         {
             AS.Stop();
         }
     }
     if (textToSpeechSource.isPlaying)
     {
         textToSpeechSource.Stop();
     }
 }
Ejemplo n.º 5
0
 protected override void CustomAttach( )
 {
     sprite.Stop();
     sprite.GoTo(1);
     G.I.PlaySound(1);
 }