Game Development Reference
In-Depth Information
Try out some of these classes and methods in the example program:
[psaaj9jasPsaaj$nk^kp(t( >kqj_a*a]oaKqp (nk^kp*t(01,(2,(b]hoa%7
[psaaj9jasPsaaj$nk^kp(t( >]_g*a]oaEjKqp (nk^kp*t(01,(2,(b]hoa%7
[psaaj9jasPsaaj$nk^kp(t( Ah]ope_*a]oaEj (nk^kp*t(01,(2,(b]hoa%7
It's like being nine years old again!
Tween events
Psaaj objects come with their own sets of events. Let's take a look at practical example of how you
can use the IKPEKJ[BEJEOD event along with the delightful ukuk method.
Open the folder UkukPsaaj from the chapter's source files as a project. Test it and you'll see that the
robot now oscillates back and forth across the screen like a yoyo! Here's what the I]ej[UkukPsaaj*]o
file looks like that makes this happen:
l]_g]ca
w
eilknpbh]od*`eolh]u*Ikrea?hel7
eilknpbh]od*arajpo*Arajp7
eilknpbh*pn]joepekjo*Psaaj7
eilknpbh*pn]joepekjo*PsaajArajp7
eilknpbh*pn]joepekjo*a]oejc*&7
lq^he__h]ooI]ej[UkukPsaajatpaj`oIkrea?hel
w
++@a_h]nar]ne]^hao
lner]par]n[psaaj6Psaaj7
lq^he_bqj_pekjI]ej[UkukPsaaj$%
w
[psaaj9jasPsaaj$nk^kp(t(Nacqh]n*a]oaEjKqp(nk^kp*t(-,,( ±
2,(b]hoa%7
[psaaj*]``ArajpHeopajan$PsaajArajp*IKPEKJ[BEJEOD( ±
kjIkpekjBejeod%7
y
lner]pabqj_pekjkjIkpekjBejeod$arajp6Arajp%
w
arajp*p]ncap*ukuk$%7
y
y
y
 
Search Nedrilad ::




Custom Search