public ISound Play(bool shouldLoop = false, ISoundProperties properties = null) { ISound sound = AudioClip.Play(shouldLoop, properties); EmittedSound emittedSound = new EmittedSound(sound); _playingSounds.TryAdd(emittedSound.ID, emittedSound); return sound; }
public void PlayAndWait(ISoundProperties properties = null) { ISound sound = AudioClip.Play(false, properties); EmittedSound emittedSound = new EmittedSound(sound); _playingSounds.TryAdd(emittedSound.ID, emittedSound); Task.Run(async () => await sound.Completed).Wait(); }
public void PlayAndWait(ISoundProperties properties = null) { properties = properties ?? this; ISound sound = playSound(properties.Volume, properties.Pitch, properties.Panning); Task.Run(async () => await sound.Completed).Wait(); }
public ISound Play(bool shouldLoop = false, ISoundProperties properties = null) { properties = properties ?? this; return playSound(properties.Volume, properties.Pitch, properties.Panning, shouldLoop); }
public ISound Play(bool shouldLoop = false, ISoundProperties properties = null) { properties = properties ?? this; return(playSound(properties.Volume, properties.Pitch, properties.Panning, shouldLoop)); }