Пример #1
0
 void PlayAudio()
 {
     //audioController.AudioStop();
     if (audioController.playing == true && audioController.audioSource == gameObject.GetComponent <AudioSource>())
     {
         audioController.AudioStop();
     }
     else
     {
         audioController.AudioStop();
         audioController.audioSource = gameObject.GetComponent <AudioSource>();
         audioController.AudioPlay();
     }
 }