Skip to content

Commit 147a4ed

Browse files
committed
fix sprite position randomizer
1 parent b1a3c4b commit 147a4ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/randomize-sprite-position.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const randomizeSpritePosition = spriteObject => {
44
const randomY = Math.floor((100 * Math.random()) - 50);
55
if (spriteObject.hasOwnProperty('json')) {
66
// Library sprite object
7-
spriteObject.json.scratchX = randomX;
8-
spriteObject.json.scratchY = randomY;
7+
spriteObject.json.x = randomX;
8+
spriteObject.json.y = randomY;
99
} else if (spriteObject.hasOwnProperty('x') && spriteObject.hasOwnProperty('y')) {
1010
// Scratch 3 sprite object
1111
spriteObject.x = randomX;

0 commit comments

Comments
 (0)