Game Development Reference
In-Depth Information
Figure 6-1. Example 1—power-ups
In the image, you can see several cylinders with three symbols: a dollar sign, a dot, and a cross.
When this example is running, each cylinder travels in a straight line. When a cylinder reaches the
edge of the screen, it wraps around to the opposite edge. As each cylinder travels, it also appears
to spin or tumble about itself. After a few seconds, the bands and symbol on each cylinder will start
flashing, announcing that it is about to disappear. When you start the example, there will be no
power-ups on the screen, but every 5 seconds, a new one is added just offscreen and will drift into
view. Let's take a closer look at the images used to create this animation. See Figure 6-2 .
Search WWH ::




Custom Search