Browse Source

added stopAllNotLooping

Nicolas Cannasse 6 năm trước cách đây
mục cha
commit
cdaf39d20a
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  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.
 	**/