Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Workshop

Quiz

1. What is the name of the base class used for animation?

2. What is the name of the method used to associate a Sprite with an Animation?

3. How is color animation applied to a Sprite object?

Answers

1. Animation

2. Sprite.SetAnimation()

3. One or more ModifyXXX() methods apply the changes to Sprite properties.

Exercises

The examples in this hour are ripe for the picking by a creative programmer! It goes without saying that you need to create your own animation class, a subclass of Animation, that performs some change to the color of a sprite over time, as the examples this hour have already shown. Come up with an awesome new technique that would be really useful in a game, such as fading to black followed by an explosion of colors just before the object “dies”—just as a suggestion!


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial