Raspberry_Pi_Education_Manual

Notes:

Here’s the code for all three sprites in the pollination project.

Code for the bee

Code for the male flower

Code for the female flower

Because I had three different sprites with their own scripts, I used the “when [green flag] clicked” event to run them all together.

Wow! That is quite a complicated project, but if you break up your animation into lots of little scenes it makes it easier to plan and to program.

To see what the whole project looks like once it’s finished, open RPiScratch/Projects/ pollination.

Tip...

Import existing sprites and a background from the Scratch picture folders. This can save you a lot of time.

A beginner’s guide to Scratch

22

Made with FlippingBook flipbook maker