Script Classes for Adventure Games/Block Class
Author: Jeff Stephenson
The Block Class
The Block class implements ability to keep Actors out of certain areas on the screen without controls being added to the picture. In particular they are the only way of preventing an Actor who is allowed to have his baseRect off the bottom of the screen from walking into something, since the Actor's baseRect will not encounter any blocking controls.
activeSet to TRUE if the Block is active, FALSE otherwise. Actors can move into inactive Blocks.
The bounding coordinates of the Block rectangle.
init:Add the Block to the set of blocks for the current room and enable the Block.
doit: actorReturn TRUE if actor is outside of the Block (and is thus in a legal position) or FALSE if it is inside the Block (and thus must be moved out). This is called in each Actor's canBeHere: method.
dispose:Delete the Block from the set of blocks for the current room and dispose of it if it is a dynamic instance.
enable:Set the active property of the Block to TRUE, so that Actors cannot enter it.
disable:Set the active property of the Block to FALSE, so that Actors can enter it.