wyvern.lib.properties
Interface DirectionChooser

All Known Implementing Classes:
AxisShapeChanger

public interface DirectionChooser

This interface is used by the wyvern.lib.properties.Appearance property to request the appropriate directional bitmap for an object. It's used for Nagas, sharks, etc. whose direction depends both on which way they last moved, and possibly whether they're currently horizontal or vertical.

To use a DirectionChooser, add an implementation of it as a property with the name "dirs-appr". The AxisShapeChanger is a DirectionChooser that knows how to do directions for monsters that can change from 1x2 to 2x1 as they move.

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

Method Summary
 java.lang.String mapDirection(int dir, GameObject obj)
          Chooses a direction to append to the passed object's bitmap name.
 

Method Detail

mapDirection

public java.lang.String mapDirection(int dir,
                                     GameObject obj)
Chooses a direction to append to the passed object's bitmap name.

Parameters:
dir - the direction the object is currently facing
obj - the object to choose for.
Returns:
the appropriate String suffix for the bitmap, usually one of: "N", "S", "E", "W", "NW", "NE", "SE", or "SW".