File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -529,17 +529,6 @@ cc.AudioEngine = cc.Class.extend(/** @lends cc.AudioEngine# */{
529529 }
530530 } ,
531531
532- /**
533- * Stop all music and sound effects
534- * @example
535- * //example
536- * cc.AudioEngine.getInstance().end();
537- */
538- end :function ( ) {
539- this . stopMusic ( ) ;
540- this . stopAllEffects ( ) ;
541- } ,
542-
543532 _getEffectList :function ( elt ) {
544533 if ( this . _effectList . hasOwnProperty ( elt ) ) {
545534 return this . _effectList [ elt ] ;
@@ -626,3 +615,18 @@ cc.AudioEngine.getInstance = function () {
626615 }
627616 return this . _instance ;
628617} ;
618+
619+
620+ /**
621+ * Stop all music and sound effects
622+ * @example
623+ * //example
624+ * cc.AudioEngine.end();
625+ */
626+ cc . AudioEngine . end = function ( ) {
627+ if ( this . _instance ) {
628+ this . _instance . stopMusic ( ) ;
629+ this . _instance . stopAllEffects ( ) ;
630+ }
631+ this . _instance = null ;
632+ } ;
You can’t perform that action at this time.
0 commit comments