
168 ◾ HTML5 Game Development from the Ground Up
A subevent to identify when Turky reached his position next to Picky
should also be added. e triggering condition for this would be, for
example, when the distance between the two sprites is less than 20 pixels.
When this happens, we stop Turky, add a big bonus to the current score,
and increase the level by adding 1 to the date global variable (which we
have to create now).
Once all this is done, we can reload the layout for the next challenge or
design a congratulations screen for the player to enjoy, like in the iOS and
BB10 version of the game.
10.4 SLY, FOXY, AND OTTO
In the previous ...