Add when touching hat

This commit is contained in:
Eric Rosenbaum committed 2018-06-07 16:41:14 -04:00
1 parent b4d4e25bf8
commit 94915a9a5e
2 files changed
+15

No files matched your search

+8
View File
@@ -185,6 +185,14 @@ export default function (vm) {
this.jsonInit(json);
};
ScratchBlocks.Blocks.event_touchingobjectmenu.init = function () {
const json = jsonForMenuBlock('TOUCHINGOBJECTMENU', spriteMenu, eventColors, [
['mouse-pointer', '_mouse_'],
['edge', '_edge_']
]);
this.jsonInit(json);
};
ScratchBlocks.Blocks.control_create_clone_of_menu.init = function () {
const json = jsonForMenuBlock('CLONE_OPTION', cloneMenu, controlColors, []);
this.jsonInit(json);
+7
View File
@@ -321,6 +321,13 @@ const events = function (isStage) {
` : `
<block type="event_whenthisspriteclicked"/>
`}
${isStage ? '' : `
<block type="event_whentouchingobject">
<value name="TOUCHINGOBJECTMENU">
<shadow type="event_touchingobjectmenu"/>
</value>
</block>
`}
<block type="event_whenbackdropswitchesto">
</block>
${blockSeparator}