Game Development Reference
In-Depth Information
To use the cat's ^k`u to define the player's collision area, all I needed to do was modify the variables
that describe the player's dimensions to specify the ^k`u as the primary object:
r]nlh]uanD]hbSe`pd6qejp9pdeo*^k`u*se`pd+.7
r]nlh]uanD]hbDaecdp6qejp9pdeo*^k`u*daecdp+.7
The keyword pdeo is optional, but it does help to clarify “the body of this object.”
Figure 9-6 illustrates the effect of using the cat's ^k`u subobject as the collision area for stage bound-
aries. This is important to note because in the upcoming example game, you'll be taking a detailed
look at how to properly use and target subobjects in your games.
Figure 9-6. The cat's body subobject is used as the collision area for checking stage boundaries.
 
Search Nedrilad ::




Custom Search