Duplicating a sprite copied the sounds into the original, not the new

This commit is contained in:
Paul Kaplan 2018-07-17 16:50:40 -04:00
parent 3fa28cac35
commit 3bb455dae5

View file

@ -155,7 +155,7 @@ class Sprite {
newSprite.sounds = this.sounds.map(sound => {
const newSound = Object.assign({}, sound);
const soundAsset = this.runtime.storage.get(sound.assetId);
assetPromises.push(loadSoundFromAsset(newSound, soundAsset, this.runtime, this));
assetPromises.push(loadSoundFromAsset(newSound, soundAsset, this.runtime, newSprite));
return newSound;
});