wyvern.lib
Interface ProximityCallback

All Known Implementing Classes:
MonsterReactions, ProximityProperty

public interface ProximityCallback

You can register for a "proximity-hook", which allows you to be notified when some event takes place within a certain distance from a target object. This way you can add hooks that happen "near" something that's moving around. The ProximityCallback interface is the way you get called back for the event hook.

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

Method Summary
 void hookEvent(java.lang.String hookName, GameObject target, CommandEvent event)
          The desired event has taken place within the specified range of the target that was passed to GameMap.addProximityHook().
 

Method Detail

hookEvent

public void hookEvent(java.lang.String hookName,
                      GameObject target,
                      CommandEvent event)
The desired event has taken place within the specified range of the target that was passed to GameMap.addProximityHook().

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 ProximityCallback 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.
target - the object near which the event took place.
event - the event