Game Development Reference
In-Depth Information
The objects in the game
There are lots of objects on the @qjcakjKja stage. Some have their own classes, but most don't need
them. Table 8-1 lists the objects on the stage with their symbol name, instance name, and class file, if
they have one.
Table 8-1. Objects u sed in the game
Object
Name and file
What it does
Symbol name :
@qjcakjKja
Instance name :
`qjcakjKja
Class file :
@qjcakjKja[I]j]can*]o
The @qjcakjKja symbol is a container for all objects in
the dungeon. It's like one of the pages of the interac-
tive storybook from Chapters 2, 3, and 4. All other
objects are inside it. @qjcakjKja has been planned as
the first level of a multilevel game. If you want to cre-
ate a game that switches levels, it makes sense to keep
each level as a separate symbol. This makes it easy to
use ]``?deh` and naikra?deh` to add the next level
and remove the previous one, just as you switched
pages in your interactive storybook.
The @qjcakjKja symbol is bound to the @qjcakjKja[
I]j]can class. This class contains all the game's logic,
such as figuring out whether the player has achieved
goals such as winning and losing.
Symbol name :
Lh]uan
Instance name :
lh]uan
Class file :
Lh]uan*]o
The Lh]uan class uses the keyboard control system
from the previous chapters to move the hero around
the dungeon. It also keeps track of whether the key has
been picked up.
Symbol name :
S]hh
Instance name :
Assigned dynamically
Class file :
S]hh*]o
There are many instances of the S]hh symbol in the
game. The game never needs to make a specific refer-
ence to any of them, so they don't need instance names.
They are all bound to the same S]hh class. The S]hh
class blocks the movement of the player character.
Symbol name :
@kkn
Instance name :
`kknKja , `kknPsk
Class file :
@kkn*]o
There are two instances of the @kkn symbol on the
stage. The @kkn class keeps track of whether the doors
are open or closed.
 
Search Nedrilad ::




Custom Search