Target Practise
Sprite | Images |
---|---|
sprExplosion |
Download sprExplosion images here: sprExplosion.zip |
sprSpaceShip | |
sprTarget | |
sprProjectile | |
sprBackground | |
It is critical all sprite origins are set to Middle Centre. For the explosion animation, you can import multiple images into the one sprite: |
Object | Sprite | Properties |
---|---|---|
objTarget | sprTarget | Visible |
objSpaceShip | sprSpaceShip | Visible |
objProjectile | sprProjectile | Visible |
room layout:
objSpaceShip | Key Down → Up event |
---|---|
objSpaceShip | Key Down → Down event |
---|---|
objSpaceShip | Key Press → Space event |
---|---|
objProjectile | Create event |
---|---|
objTarget | Collision → objProjectile event |
---|---|
objTarget | Animation End event |
---|---|
extension activities:
- Add the wave spawner object objSpawner from the previous example to spawn waves of targets.
- Add scoring, lives and health to this example where possible.
- Add another room - "level 2" - with a different background. Hint: The Go To Room block is fairly easy to use here, after a win condition has been satisifed: