Step 4

Completing our food function!


In this step we will complete our food function by setting two properties.

The first is to set it so our whole food art appears on the screen. If we do not do this our food will sometimes appear half outside the view screen.

The last block of code will create a timer. This will add a rule to our game to eat the food before time runs out!