Game Development Reference
In-Depth Information
_da_g?khheoekjSepdAjaieao is a method in @qjcakjKja[I]j]can, which is the bullet's l]najp. It takes
one parameter, which is the bullet object itself: pdeo.
pdeo from the >qhhap class becomes ^qhhap when it's sent to the _da_g?khheoekjSepdAjaieao
method. Figure 8-24 illustrates how it fits together.
Bullet Class
Ikrea?hel$l]najp%*_da_g?khheoekjSepdAjaieao$pdeo%7
DungeonOne_Manager Class
lq^he_bqj_pekj_da_g?khheoekjSepdAjaieao$^qhhap6Ikrea?hel%
w
***
y
Figure 8-24. The bullet objects send references of themselves to the
checkCollisionWithEnemies method. The method can now refer to them
by using the variable name bullet, which is assigned in its parameter.
Here's the entire _da_g?khheoekjSepdAjaieao method from the @qjcakjKja[I]j]can class:
lq^he_bqj_pekj_da_g?khheoekjSepdAjaieao$^qhhap6Ikrea?hel%
w
++AjaiuKja
eb$ajaiuKja9jqhh%
w
eb$ajaiuKja*depPaopLkejp$^qhhap*t(^qhhap*u(pnqa%%
w
ajaiuKja*oq^K^fa_p*iapan*se`pd)9-,7
eb$ajaiuKja*oq^K^fa_p*iapan*se`pd8-%
w
ajaiuKja*oq^K^fa_p*opkl$%7
naikra?deh`$ajaiuKja%7
ajaiuKja9jqhh7
y
naikra?deh`$^qhhap%7
^qhhap9jqhh7
y
y
 
Search Nedrilad ::




Custom Search