コード例 #1
0
    // Token: 0x060001A0 RID: 416 RVA: 0x00019DE4 File Offset: 0x00017FE4
    private void PlayAudio(AudioSource au, ClipInfo clipInfo)
    {
        if (au.isPlaying)
        {
            au.Stop();
        }
        au.loop     = clipInfo.Loop;
        au.volume   = clipInfo.Volume * this.BaseVol;
        au.pitch    = clipInfo.Pitch;
        au.clip     = clipInfo.clip;
        au.panLevel = clipInfo.PanLevel;
        au.enabled  = true;
        float?delaySecond = clipInfo.DelaySecond;

        if (delaySecond == null)
        {
            au.Play();
        }
        else
        {
            au.PlayDelayed(clipInfo.DelaySecond.Value);
        }
        clipInfo.clear();
    }