mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Change function name and comment for clarity
This commit is contained in:
parent
1a72512a62
commit
db7c56e08b
3 changed files with 4 additions and 4 deletions
|
@ -63,7 +63,7 @@ class Scratch3EventBlocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
touchingObject (args, util) {
|
touchingObject (args, util) {
|
||||||
return util.target.touchingObject(args.TOUCHINGOBJECTMENU);
|
return util.target.isTouchingObject(args.TOUCHINGOBJECTMENU);
|
||||||
}
|
}
|
||||||
|
|
||||||
hatGreaterThanPredicate (args, util) {
|
hatGreaterThanPredicate (args, util) {
|
||||||
|
|
|
@ -150,7 +150,7 @@ class Scratch3SensingBlocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
touchingObject (args, util) {
|
touchingObject (args, util) {
|
||||||
return util.target.touchingObject(args.TOUCHINGOBJECTMENU);
|
return util.target.isTouchingObject(args.TOUCHINGOBJECTMENU);
|
||||||
}
|
}
|
||||||
|
|
||||||
touchingColor (args, util) {
|
touchingColor (args, util) {
|
||||||
|
|
|
@ -725,11 +725,11 @@ class RenderedTarget extends Target {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return whether touching the mouse, an edge, or a sprite.
|
* Return whether this target is touching the mouse, an edge, or a sprite.
|
||||||
* @param {string} requestedObject an id for mouse or edge, or a sprite name.
|
* @param {string} requestedObject an id for mouse or edge, or a sprite name.
|
||||||
* @return {boolean} True if the sprite is touching the object.
|
* @return {boolean} True if the sprite is touching the object.
|
||||||
*/
|
*/
|
||||||
touchingObject (requestedObject) {
|
isTouchingObject (requestedObject) {
|
||||||
if (requestedObject === '_mouse_') {
|
if (requestedObject === '_mouse_') {
|
||||||
if (!this.runtime.ioDevices.mouse) return false;
|
if (!this.runtime.ioDevices.mouse) return false;
|
||||||
const mouseX = this.runtime.ioDevices.mouse.getClientX();
|
const mouseX = this.runtime.ioDevices.mouse.getClientX();
|
||||||
|
|
Loading…
Reference in a new issue