File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ Version 2.0.5 - "Tanchico" - in development
9393* Tilemap.createFromObjects will now force the creation of the property again even if it doesn't exist (regression fix from 2.0.4)
9494* Phaser.Line.intersectsPoints fixed by properly checking the boundaries (thanks @woutercommandeur , fix #790 )
9595* Group.set and setAll were changed in 2.0.4 to not create the property unless it existed. This broke backwards compatibility, so has been fixed.
96+ * Sound.play now returns the Sound object (thanks @AnderbergE , fix #802 )
9697
9798
9899
Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ Phaser.Sound.prototype = {
432432 if ( this . isPlaying === true && forceRestart === false && this . override === false )
433433 {
434434 // Use Restart instead
435- return ;
435+ return this ;
436436 }
437437
438438 if ( this . isPlaying && this . override )
@@ -486,7 +486,7 @@ Phaser.Sound.prototype = {
486486 else
487487 {
488488 console . warn ( "Phaser.Sound.play: audio marker " + marker + " doesn't exist" ) ;
489- return ;
489+ return this ;
490490 }
491491 }
492492 else
@@ -623,6 +623,9 @@ Phaser.Sound.prototype = {
623623 }
624624 }
625625 }
626+
627+ return this ;
628+
626629 } ,
627630
628631 /**
You can’t perform that action at this time.
0 commit comments