EasyManua.ls Logo

SunFounder TS-10 - Page 168

Default Icon
213 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SunFounder TS-10 10.1-inch Touch Screen
Calculate the score!
Create a new score variable. When the Trees and Trees2 sprites move to the right side of the Parrot sprite, it means that
Parrot has crossed the Trees and Trees2. At this time, we will add score+1. In order to avoid always adding points, we
need to add it after score+1 Wait 1 second for the code. (This code is required in both Trees and Trees2 sprites!)
Game failure mechanism
When the Parrot sprite encounters a tree or falls to the ground during the flight, we judge the game is over, and then
we stop all scripts.
164 Chapter 5. PROJECTS AND ACTIVITIES

Related product manuals