Skip to content

Instantly share code, notes, and snippets.

@SheepTester
Created January 3, 2019 21:21
Show Gist options
  • Select an option

  • Save SheepTester/a56cf5d5e0474d837d2cfc29ebc1ba4c to your computer and use it in GitHub Desktop.

Select an option

Save SheepTester/a56cf5d5e0474d837d2cfc29ebc1ba4c to your computer and use it in GitHub Desktop.
class CommentDemo {
constructor() {}
getInfo() {
return {
id: 'commentdemo',
name: 'Comment demo',
colour: '#607D8B',
colourSecondary: '#455A64',
colourTertiary: '#263238',
blocks: [
{
opcode: 'commentBlock',
blockType: Scratch.BlockType.COMMAND,
text: 'comment: [A]',
arguments: {
A: {
type: Scratch.ArgumentType.STRING,
defaultValue: 'Comment text here'
}
}
},
{
opcode: 'commentC',
blockType: Scratch.BlockType.CONDITIONAL,
text: 'comment: [A]',
arguments: {
A: {
type: Scratch.ArgumentType.STRING,
defaultValue: 'Comment text here'
}
}
}
]
}
}
commentBlock({A}) {
return;
}
commentC({A}) {
return;
}
}
Scratch.extensions.register(new CommentDemo());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment