Game Development Reference
In-Depth Information
Adding scripts to Spaceship Ammo
and Enemy Ammo
The Spaceship sprite ights enemy sprites with Spaceship Ammo, and enemy sprites atack
with the Enemy Ammo sprites.
Prepare for lift off
Spaceship Ammo has one local variable, speed . The speed variable is how fast this sprite
moves. Upon creaion, it lies out of the Spaceship sprite and moves straight up unil it hits
an enemy or the top edge of the Stage.
The Enemy Ammo sprite is very similar to the Spaceship Ammo sprite and is different only in
direcion, hit target (the sprites it can hurt), and costumes.
 
Search WWH ::




Custom Search