mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-10 04:21:09 -04:00
Implement 'hide all sprites' and 'user id' blocks
This commit is contained in:
parent
23e72525bf
commit
231402fc53
3 changed files with 17 additions and 1 deletions
src
|
@ -244,6 +244,7 @@ class Scratch3LooksBlocks {
|
|||
looks_thinkforsecs: this.thinkforsecs,
|
||||
looks_show: this.show,
|
||||
looks_hide: this.hide,
|
||||
looks_hideallsprites: this.doNothing,
|
||||
looks_switchcostumeto: this.switchCostume,
|
||||
looks_switchbackdropto: this.switchBackdrop,
|
||||
looks_switchbackdroptoandwait: this.switchBackdropAndWait,
|
||||
|
@ -479,6 +480,8 @@ class Scratch3LooksBlocks {
|
|||
// Else return name
|
||||
return util.target.getCostumes()[util.target.currentCostume].name;
|
||||
}
|
||||
|
||||
doNothing() {}
|
||||
}
|
||||
|
||||
module.exports = Scratch3LooksBlocks;
|
||||
|
|
|
@ -66,7 +66,8 @@ class Scratch3SensingBlocks {
|
|||
sensing_dayssince2000: this.daysSince2000,
|
||||
sensing_loudness: this.getLoudness,
|
||||
sensing_askandwait: this.askAndWait,
|
||||
sensing_answer: this.getAnswer
|
||||
sensing_answer: this.getAnswer,
|
||||
sensing_userid: this.doNothing
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -293,6 +294,8 @@ class Scratch3SensingBlocks {
|
|||
// Otherwise, 0
|
||||
return 0;
|
||||
}
|
||||
|
||||
doNothing() {}
|
||||
}
|
||||
|
||||
module.exports = Scratch3SensingBlocks;
|
||||
|
|
|
@ -266,6 +266,11 @@ const specMap = {
|
|||
argMap: [
|
||||
]
|
||||
},
|
||||
'hideAll': {
|
||||
opcode: 'looks_hideallsprites',
|
||||
argMap: [
|
||||
]
|
||||
},
|
||||
'lookLike:': {
|
||||
opcode: 'looks_switchcostumeto',
|
||||
argMap: [
|
||||
|
@ -1043,6 +1048,11 @@ const specMap = {
|
|||
argMap: [
|
||||
]
|
||||
},
|
||||
'getUserId': {
|
||||
opcode: 'sensing_userid',
|
||||
argMap: [
|
||||
]
|
||||
},
|
||||
'+': {
|
||||
opcode: 'operator_add',
|
||||
argMap: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue