internal void Play(SoundInfo info, AudioMixerGroup group, PlayingSoundContext context, bool force) { if (info.PlayControl == null) { PlayImpl(info, group, context, force); } else { switch (info.PlayControl.Update(this, info)) { case StartControl.Result.Start: PlayImpl(info, group, context, force); break; case StartControl.Result.Wait: m_Request.Add(new Request { Info = info, Group = group, Context = context, Force = force }); break; } } }
void PlayImpl(SoundInfo info, AudioMixerGroup group, PlayingSoundContext context, bool force) { var sound = Borrow(force); if (sound == null) { context?.PlayFail(new NotPoolException("プールから音源を確保できませんでした")); return; } sound.PlayRequest(info, group, context); m_Playing.Add(sound); }
public bool IsCurrent(PlayingSoundContext context) { return(context == m_Context); }