kopia lustrzana https://github.com/backface/turtlestitch
Merge d2188dacc8
into 1671dd5dd8
commit
489fb4e74e
|
@ -1892,11 +1892,17 @@ SpriteMorph.prototype.initBlocks = function () {
|
|||
category: 'other'
|
||||
};
|
||||
|
||||
this.blocks.reportPi = {
|
||||
type: 'reporter',
|
||||
category: 'operators',
|
||||
spec: 'PI',
|
||||
};
|
||||
this.blocks.reportPi = {
|
||||
type: 'reporter',
|
||||
category: 'operators',
|
||||
spec: 'PI',
|
||||
};
|
||||
this.blocks.receiveInteraction = {
|
||||
type: 'hat',
|
||||
category: 'control',
|
||||
spec: 'when stage is %interaction',
|
||||
defaults: ['clicked']
|
||||
};
|
||||
};
|
||||
|
||||
SpriteMorph.prototype.initBlocks();
|
||||
|
@ -3422,3 +3428,10 @@ SpriteMorph.prototype.palette = function (category) {
|
|||
}
|
||||
return this.paletteCache[category];
|
||||
};
|
||||
|
||||
StageMorph.prototype.mouseClickLeft = function () {
|
||||
let sprite = detect(
|
||||
this.children,
|
||||
morph => morph instanceof SpriteMorph);
|
||||
return sprite.receiveUserInteraction('clicked');
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue