BGMManager.PlayAudio C# (CSharp) Method

PlayAudio() private method

private PlayAudio ( int times ) : IEnumerator
times int
return IEnumerator
    IEnumerator PlayAudio(int times)
    {
        yield return new WaitForSeconds(introDelay);
        for(int i=0; i<times; i++)
        {
            GetComponent<AudioSource>().PlayOneShot(bgm, 0.7f);
            yield return new WaitForSeconds(bgm.length);
        }
    }