If you want, you can also add patrolling enemies to your game. If the player
sprite touches an enemy, the game ends.
enemy
sprite. Add code to the enemy
sprite so that it only appears in room 2.enemy
sprite and to end the game if the enemy
sprite touches the player
sprite. It’s easier to do this in separate code blocks. Here’s how your enemy
sprite code might look:enemy
sprite only visible in room 2enemy
sprite patrols the roomplayer
sprite touches the enemy
spriteCan you create another
sprite in room 3 that patrols up and down through the gap in the wall?enemy