Game Development Reference
In-Depth Information
The Block object
These objects form the individual pieces of the _terrain object. They can take the shape
of a building, or an empty gap between buildings. We'll have four different types of build-
ings, which later will represent four different types of textures when we finally bring in our
sprite sheets. These blocks can have different widths and heights.
Block also derives from GameSprite and it also has inline helper methods to retrieve
information about its boundaries, but only in relation to its current position, since Block
doesn't technically move.
Search WWH ::




Custom Search