2016-03-25 16:47:20 -07:00
|
|
|
# Touching
|
|
|
|
|
|
|
|
Reports true if sprite is touching specified sprite
|
|
|
|
|
2016-07-08 16:34:56 -07:00
|
|
|
```blocks
|
|
|
|
let matter = game.createSprite(2, 2);
|
|
|
|
let antimatter = game.createSprite(2, 2);
|
|
|
|
if (matter.isTouching(antimatter)) {
|
|
|
|
basic.pause(500);
|
|
|
|
basic.clearScreen();
|
|
|
|
basic.showString("BOOM!");
|
|
|
|
}
|
2016-03-25 16:47:20 -07:00
|
|
|
```
|