310 | Chapter 8: Observer Pattern
You have set up all the classes and objects you’ll need for the stage. Check your
Library panel to be sure you have the following movie clips:
- Alien
- Android
- Beam
- bullet
- Earthling
- Missile
- projectile
- Torpedo
Those objects beginning with capital letters are classes and those beginning with
lowercase letters are objects belonging to one of the classes.
Writing a Change Handler
In creating something to change conditions and send messages to the “Earthling,”
“Alien,” and “Android,” you need to use your imagination a bit. If an opponent’s
projectile or the beam from the Android hits either the Alien or Earthling, its hit total
Figure 8-5. Android shooting a beam at the Earthling and Alien ships