The dragonfly needs a choice of insects.
Right-click on the Insect sprite in the Sprite list under the Stage and duplicate it.
It’s helpful if this insect looks different to the fly.
Click on the Costumes tab.
Choose: Create a different flying insect.
The insect gets eaten even if it touches the dragonfly’s wing or tail.
To make your app more realistic, fix this so that the insect gets eaten by the dragonfly’s mouth. You can use the touching color
block so the insect only gets eaten if it is touches a particular colour on the Dragonfly.
Select the Dragonfly sprite and click on the Costumes tab.
Use the fill tool to fill in the Dragonfly’s mouth. We used purple:
You need to check that the Insect2 sprite is touching the Dragonfly sprite and
touching the colour of the dragonfly’s mouth.
Select the Insect2 sprite and click on the Code tab.
Drag an
block into the and
if
block.
The <touching [Dragonfly v] ?>
block will pop out, drag it into the left of the
block:and
Drag a touching color
block into the right of the
block:and
If it doesn’t have the colour of the dragonfly’s mouth selected, click on the colour circle and then click on the Eyedropper tool to select a colour.
Click on the dragonfly’s mouth on the Stage to set the colour to match:
Tip: If this is tricky to do, change the size of the Dragonfly sprite so it’s really big.
Test: Now test that the dragonfly can only eat the second insect with its mouth.
If you like, you can change the first Insect so that it can only be eaten with the dragonfly’s mouth.