10.12.2012 Views

ActionScript 3.0 Design Patterns.pdf - VideoTutorials-bg.com

ActionScript 3.0 Design Patterns.pdf - VideoTutorials-bg.com

ActionScript 3.0 Design Patterns.pdf - VideoTutorials-bg.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 8-5. Android shooting a beam at the Earthling and Alien ships<br />

You have set up all the classes and objects you’ll need for the stage. Check your<br />

Library panel to be sure you have the following movie clips:<br />

• Alien<br />

• Android<br />

• Beam<br />

• bullet<br />

• Earthling<br />

• Missile<br />

• projectile<br />

• Torpedo<br />

Those objects beginning with capital letters are classes and those beginning with<br />

lowercase letters are objects belonging to one of the classes.<br />

Writing a Change Handler<br />

In creating something to change conditions and send messages to the “Earthling,”<br />

“Alien,” and “Android,” you need to use your imagination a bit. If an opponent’s<br />

projectile or the beam from the Android hits either the Alien or Earthling, its hit total<br />

310 | Chapter 8: Observer Pattern

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!