rle.simple.board
Class LightMgr
java.lang.Object
rle.core.vm.PlugInBase
rle.simple.board.LightMgr
- All Implemented Interfaces:
- BoardListener, ThingListener, RuntimeDataListener, PlugIn
public class LightMgr
- extends PlugInBase
- implements ThingListener, BoardListener
This is a busy plug-in that maintains lighting conditions on the
Board. When things move that have the runtime property light-radius
set, we cast their light. When the GameContext enters a Board that
has daylight, we give light to each thing. If the runtime property
light-radius changes, we update the light. Finally, as things are
added to or removed from the board we react appropriately.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LightMgr
public LightMgr()
initialize
public void initialize(Board b)
locationChange
public void locationChange(ThingMoveEvent event)
- Specified by:
locationChange
in interface ThingListener
dataChange
public void dataChange(RuntimeDataEvent event)
- Specified by:
dataChange
in interface RuntimeDataListener
thingInsert
public void thingInsert(ThingInsertEvent event)
- Specified by:
thingInsert
in interface BoardListener
computeFieldOfView
protected java.util.Set<RLPoint> computeFieldOfView(Thing t,
int radius)
- Compute field-of-view.
thingRemove
public void thingRemove(ThingRemoveEvent event)
- Specified by:
thingRemove
in interface BoardListener