Game Development Reference
In-Depth Information
lq^he_bqj_pekjI]ej[A]oejcSepdIkqoa$%
w
++Ejepe]hevar]ne]^hao
[p]ncapT9lh]uan*t7
[p]ncapU9lh]uan*u7
++=``arajpheopajano
op]ca*]``ArajpHeopajan$IkqoaArajp*IKQOA[@KSJ(kjIkqoa@ksj%7
y
lner]pabqj_pekjkjAjpanBn]ia$arajp6Arajp%6rke`
w
++?]h_qh]papda`eop]j_abnkipdalh]uanpkpdaikqoa
r]n`t6Jqi^an9[p]ncapT)lh]uan*t7
r]n`u6Jqi^an9[p]ncapU)lh]uan*u7
r]n`eop]j_a9I]pd*omnp$`t&`t'`u&`u%7
++Ikrapdak^fa_pebepeoiknapd]j-letah]s]ubnkipdaikqoa
eb$`eop]j_a:9-%
w
lh]uan*t'9$[p]ncapT)lh]uan*t%&A=OEJC7
lh]uan*u'9$[p]ncapU)lh]uan*u%&A=OEJC7
y
ahoa
w
pn]_a$Lh]uanna]_da`p]ncap%
naikraArajpHeopajan$Arajp*AJPAN[BN=IA(kjAjpanBn]ia%7
y
y
lner]pabqj_pekjkjIkqoa@ksj$arajp6Arajp%6rke`
w
[p]ncapT9ikqoaT7
[p]ncapU9ikqoaU7
]``ArajpHeopajan$Arajp*AJPAN[BN=IA(kjAjpanBn]ia%7
y
y
y
When the player clicks anywhere on the stage with the mouse, the kjIkqoa@ksj event handler
is called. It stores the mouse's position in two variables: [p]ncapT and [p]ncapU. It also adds the
kjAjpanBn]ia event listeners. (This is another example of the listener not being added until it's
needed.)
 
Search Nedrilad ::




Custom Search