Game Development Reference
In-Depth Information
In the object classes, use a method that looks like this:
lq^he_bqj_pekjbn]iaArajpo$%6rke`
w
++=``]ju_k`apd]pskqh`ckejpk]j
++AJPAN[BN=IAarajpdana
y
It's an ordinary function definition, but it behaves like an AJPAN[BN=IA event because it's called from
inside the manager class's AJPAN[BN=IA event. This means that you have only one AJPAN[BN=IA event
running for all the objects in the game. You can use it to precisely control the order in which the sub-
object's frame events run. If you want the k^fa_p? frame events to run before those of k^fa_p=, you
can change the order like this:
lner]pabqj_pekjkjAjpanBn]ia$arajp6Arajp%6rke`
w
k^fa_p?*bn]iaArajpo$%7
k^fa_p>*bn]iaArajpo$%7
k^fa_p=*bn]iaArajpo$%7
y
This system allows you to fine-tune the accuracy of the collision-detection system of your game and
avoid off-by-one errors. Remember this solution! It could become a life-saver in some of your own
game design projects. For games requiring accurate collision detection, it's essential.
This was a bit of a detour, but an important one. Now let's get back to Dungeon Maze Adventure!
Winning the game
When both enemies are defeated, `kknPsk opens:
eb$$ajaiuKja99jqhh%""$ajaiuPsk99jqhh%%
w
eb$`kknPsk*eoKlaj%
w
`kknPsk*eoKlaj9pnqa7
y
y
ahoa
w
?khheoekj*^hk_g$lh]uan(`kknPsk%7
y
 
Search Nedrilad ::




Custom Search