wyvern.lib.event
Interface MapLifecycleListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
AnimationParams, MapLifecycleAdapter, TerrainSpeed

public interface MapLifecycleListener
extends java.util.EventListener

Listener interface for objects that want to be notified when a particular map loads, unloads, suspends, or resumes.

The typical use is to have your GameObject class implement MapLifecycleListener, put it in a map, and it will automatically start receiving the notifications. It stops receiving the notifications as soon as it's removed/destroyed.

The only way you'll get the MapLifecycleEvent.LOAD event type is if your object is placed in the map while it's loading, which means you've put an archetype for it in the map file, either by hand or with the map editor. You could also do it by implementing a custom MapLoader or GameMap class.

Version:
1.0, Aug 09, 2003
Author:
Steve Yegge

Method Summary
 void mapLoaded(MapLifecycleEvent event)
          Invoked when a map is loaded.
 void mapResumed(MapLifecycleEvent event)
          Invoked when a map is resumed.
 void mapSuspended(MapLifecycleEvent event)
          Invoked when a map is suspended.
 void mapUnloaded(MapLifecycleEvent event)
          Invoked when a map is unloaded.
 

Method Detail

mapLoaded

public void mapLoaded(MapLifecycleEvent event)
Invoked when a map is loaded.


mapUnloaded

public void mapUnloaded(MapLifecycleEvent event)
Invoked when a map is unloaded.


mapSuspended

public void mapSuspended(MapLifecycleEvent event)
Invoked when a map is suspended.


mapResumed

public void mapResumed(MapLifecycleEvent event)
Invoked when a map is resumed.