wyvern.lib
Interface RoomHookCallback

All Known Implementing Classes:
NeedleLeaf, Shop, TreasurePile, VoiceDoor, VoicePerson

public interface RoomHookCallback

This interface is used to call back an object that has registered a room-hook with a map. A "room" is simply any sub-rectangle of a map; it doesn't have to coincide with actual walls or other map elements. It's a way for an object to know if an event happens in a rectangular area of a map.

Version:
1.0, May 19, 1998
Author:
Steve Yegge

Method Summary
 void hookEvent(java.lang.String hookName, Rectangle room, CommandEvent event)
          The desired event has taken place in the specified room.
 

Method Detail

hookEvent

public void hookEvent(java.lang.String hookName,
                      Rectangle room,
                      CommandEvent event)
The desired event has taken place in the specified room.

The callback object should be careful not to do too much processing on the calling thread. However, it's useful to note that when this method is called, the RoomHookCallback object has the map-exclusive and can make changes to the map. This isn't true if it pushes the processing onto another thread.

Parameters:
hookName - the name of the hook (e.g. "sayPostHook") that's being run.
room - the room in which the event took place, in case the callback is registered for the same hook in more than one room.
event - the event