瀏覽代碼

added stopAllNotLooping

Nicolas Cannasse 6 年之前
父節點
當前提交
cdaf39d20a
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      hxd/snd/Manager.hx

+ 9 - 0
hxd/snd/Manager.hx

@@ -151,6 +151,15 @@ class Manager {
 			channels.stop();
 	}
 
+	public function stopAllNotLooping() {
+		var c = channels;
+		while( c != null ) {
+			var n = c.next;
+			if( !c.loop ) c.stop();
+			c = n;
+		}
+	}
+
 	/**
 		Returns iterator with all active instances of a Sound at the call time.
 	**/