mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Handle random backdrop
This commit is contained in:
parent
16c6868779
commit
4419014421
1 changed files with 2 additions and 0 deletions
|
@ -343,6 +343,8 @@ class Scratch3LooksBlocks {
|
|||
} else if (requestedCostume === 'next costume' ||
|
||||
requestedCostume === 'next backdrop') {
|
||||
target.setCostume(target.currentCostume + 1);
|
||||
} else if (requestedCostume === 'random backdrop') {
|
||||
target.setCostume(Math.floor(Math.random() * target.getCostumes().length));
|
||||
} else {
|
||||
const forcedNumber = Number(requestedCostume);
|
||||
if (!isNaN(forcedNumber)) {
|
||||
|
|
Loading…
Reference in a new issue