소스 검색

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();
 			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.
 		Returns iterator with all active instances of a Sound at the call time.
 	**/
 	**/