Merge pull request #825 from ericrosenbaum/bugfix/clones-get-audioplayer-ref

Clones get a reference to parent’s audioPlayer
This commit is contained in:
Eric Rosenbaum 2017-12-08 11:40:31 -05:00 committed by GitHub
commit f33c6294bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,7 +137,11 @@ class RenderedTarget extends Target {
*/
this.audioPlayer = null;
if (this.runtime && this.runtime.audioEngine) {
if (this.isOriginal) {
this.audioPlayer = this.runtime.audioEngine.createPlayer();
} else {
this.audioPlayer = this.sprite.clones[0].audioPlayer;
}
}
}