Sfoglia il codice sorgente

keep backward compatible api

Nicolas Cannasse 8 anni fa
parent
commit
51ec5790bf
1 ha cambiato i file con 6 aggiunte e 1 eliminazioni
  1. 6 1
      hxd/res/Sound.hx

+ 6 - 1
hxd/res/Sound.hx

@@ -71,11 +71,16 @@ class Sound extends Resource {
 		}
 	}
 
-	public function play( ?loop = false, ?channelGroup, ?soundGroup ) {
+	public function play( ?loop = false, ?volume = 1., ?channelGroup, ?soundGroup ) {
 		lastPlay = haxe.Timer.stamp();
 		channel = hxd.snd.Driver.get().play(this, channelGroup, soundGroup);
 		channel.loop = loop;
+		channel.volume = volume;
 		return channel;
 	}
 
+	public static function startWorker() {
+		return false;
+	}
+
 }