Change function name and comment for clarity

This commit is contained in:
Eric Rosenbaum 2018-06-07 14:12:23 -04:00
parent 1a72512a62
commit db7c56e08b
3 changed files with 4 additions and 4 deletions

View file

@ -63,7 +63,7 @@ class Scratch3EventBlocks {
}
touchingObject (args, util) {
return util.target.touchingObject(args.TOUCHINGOBJECTMENU);
return util.target.isTouchingObject(args.TOUCHINGOBJECTMENU);
}
hatGreaterThanPredicate (args, util) {

View file

@ -150,7 +150,7 @@ class Scratch3SensingBlocks {
}
touchingObject (args, util) {
return util.target.touchingObject(args.TOUCHINGOBJECTMENU);
return util.target.isTouchingObject(args.TOUCHINGOBJECTMENU);
}
touchingColor (args, util) {

View file

@ -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.
* @return {boolean} True if the sprite is touching the object.
*/
touchingObject (requestedObject) {
isTouchingObject (requestedObject) {
if (requestedObject === '_mouse_') {
if (!this.runtime.ioDevices.mouse) return false;
const mouseX = this.runtime.ioDevices.mouse.getClientX();