wyvern.kernel.maps
Class ProximityHookList

java.lang.Object
  extended bywyvern.kernel.maps.ProximityHookList

public class ProximityHookList
extends java.lang.Object

This class implements "proximity-hooks". A proximity-hook is a way for an object A to be notified when an event happens within a certain range of object B. (A and B can be the same object). It works even if A is moving around in the map.

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

Constructor Summary
ProximityHookList()
           
 
Method Summary
 void addHook(ProximityCallback callback, java.lang.String hookName, GameObject target, Rectangle range)
          Adds a callback to a hook.
 void removeHook(ProximityCallback callback, java.lang.String hookName, GameObject target, Rectangle range)
           
 void runFailedPostHook(CommandEvent event)
           
 void runPostHook(CommandEvent event)
           
 void runPreHook(CommandEvent event)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProximityHookList

public ProximityHookList()
Method Detail

addHook

public void addHook(ProximityCallback callback,
                    java.lang.String hookName,
                    GameObject target,
                    Rectangle range)
Adds a callback to a hook. The callback is only notified if the desired event occurs within the specified range of the passed target.


removeHook

public void removeHook(ProximityCallback callback,
                       java.lang.String hookName,
                       GameObject target,
                       Rectangle range)

runPreHook

public void runPreHook(CommandEvent event)

runPostHook

public void runPostHook(CommandEvent event)

runFailedPostHook

public void runFailedPostHook(CommandEvent event)

toString

public java.lang.String toString()