Game Development Reference
In-Depth Information
Bouncing
After acceleration and friction happen, bouncing is a piece of cake (the un-infinite kind!).
Bind the ?]p symbol to the Lh]uan[>kqj_a class using the same steps you followed earlier. Move the
cat around the stage with the arrow keys and you'll notice that you can bounce it off the stage edges,
as shown in Figure 9-3.
Figure 9-3. Bounce the cat off the edges of the stage.
Double-click the Lh]uan[>kqj_a class in the Project panel to open it. You'll notice that it's remarkably
similar to Lh]uan[Bne_pekj, except for the addition of a new [^kqj_a variable and few other small
changes.
The [^kqj_a variable is declared with a value of ),*3:
[rt9,7
[ru9,7
[]__ahan]pekjT9,7
[]__ahan]pekjU9,7
[olaa`Heiep917
[bne_pekj9,*527
[^kqj_a9),*37
 
Search Nedrilad ::




Custom Search