Your
sprite should have be able to collect coins as it moves through the world.player
Add a new variable valled
to your project.coins
Select the
sprite and click show.coin
Add code to your
sprite so that it only appears in room 1.coin
Add code to your
sprite so that the sprite coin
hides
and 1
is added to the
variable once the coins
player
sprite touches the
sprite to ‘pick it up’.coin
Now add code to the Stage to set your coins
variable to 0
at the start of the game.
Test your game. Collecting a coin should change your
score to coins
.1