Step 5

Creating a Bad Food


In this step we’re going to make a new kind of food to interact with

This food will make us lose life if we touch it!

Start by creating a new function, call it createBadFood

Set the badFood to act just like the other food


Now we want to program the badFood to behave just like the food we programmed earlier.

If you are not sure where to get some of the shown blocks, feel free to look back to the previous steps.

All of the coding here should be the same, just be sure the variable names are different!

Making the bad food appear


Lastly, we need to call the function to make the badFood appear