wyvern.kernel.motion
Interface Deformer

All Known Implementing Classes:
AxisShapeChanger

public interface Deformer

This interface is used by objects whose shape can change when they move. The implementing object must examine each move and determine the desired destination locations for the object.

Version:
1.0, Oct 13, 1998
Author:
Steve Yegge

Method Summary
 java.util.List getDestination(GameObject agent, int dir, Point offsets)
          The kernel motion manager is asking the object to provide its post-move locations.
 

Method Detail

getDestination

public java.util.List getDestination(GameObject agent,
                                     int dir,
                                     Point offsets)
The kernel motion manager is asking the object to provide its post-move locations. The object doesn't have to worry about checking to see if the move is legal; it only needs to see if a successful move in the passed direction will change the shape.

Parameters:
agent - the object to move
dir - a wyvern.lib.Direction constant (movement direction)
offsets - the results of calling Direction.getXYOffsets(dir), passed in so you don't have to do it.
Returns:
a List of Point objects corresponding to the absolute map locations the object should occupy after the move. Even if the object doesn't change shape, it needs to return a list containing the object's current locations translated by the passed offsets.