Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
		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();
		}
Ejemplo n.º 4
0
		public ISound Play(bool shouldLoop = false, ISoundProperties properties = null)
		{
			properties = properties ?? this;
			return playSound(properties.Volume, properties.Pitch, properties.Panning, shouldLoop);
		}
Ejemplo n.º 5
0
 public ISound Play(bool shouldLoop = false, ISoundProperties properties = null)
 {
     properties = properties ?? this;
     return(playSound(properties.Volume, properties.Pitch, properties.Panning, shouldLoop));
 }