Beispiel #1
0
 public void stopAllSounds()
 {
     foreach (AudioSource AS in _audioSource)
     {
         AS.Stop();
     }
 }
Beispiel #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");
    }
 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();
     }
 }
Beispiel #5
0
 protected override void CustomAttach( )
 {
     sprite.Stop();
     sprite.GoTo(1);
     G.I.PlaySound(1);
 }