2016-03-26 00:47:20 +01:00
|
|
|
# Touching
|
|
|
|
|
|
|
|
Reports true if sprite is touching specified sprite
|
|
|
|
|
2016-07-09 01:34:56 +02: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-26 00:47:20 +01:00
|
|
|
```
|