Duplicating a sprite copied the sounds into the original, not the new
This commit is contained in:
1 parent
3fa28cac35
commit
3bb455dae5
1 file changed
+1
-1
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user