Game Development Reference
In-Depth Information
Figure 9-5. Press the spacebar or up arrow key to make the cat jump.
To implement jumping, you need two new variables:
[rt9,7
[ru9,7
[]__ahan]pekjT9,7
[]__ahan]pekjU9,7
[olaa`Heiep917
[bne_pekj9,*527
[cn]repu9,*/7
[eoKjCnkqj`9qj`abeja`7
[fqilBkn_a9)-,7
[eoKjCnkqj` is a Boolean value that tells the class whether the object is on the ground. It's initialized
as qj`abeja` because you might not always know whether the object will be on the ground when the
game starts.
 
Search Nedrilad ::




Custom Search