|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.common.tiles.TileInfo
This class encapsulates information about a set of images in the database. Many images have more than one direction for the image, and some images have multiple animation frames per direction.
A TileInfo is never created for images with no directions or animations.
Field Summary | |
static int |
D
|
static int |
E
|
static int |
N
|
static int |
NE
|
static TileInfo |
NO_INFO
A placeholder for wyvern.lib.properties.Appearance that tells us not to keep looking for the info. |
static int |
NONE
|
static int |
NUM_DIRS
|
static int |
NW
|
static int |
S
|
static int |
SE
|
static int |
SW
|
static int |
U
|
static int |
W
|
Method Summary | |
int[] |
getDirections()
Returns an array of the directions available for this image. |
java.lang.String[] |
getDirs()
Returns a list of the directions available for this image. |
java.lang.String |
getName()
Returns the base name for this tile (e.g. |
int |
getNumDirs()
Returns the number of directional versions there are of the base image. |
int |
getNumFrames()
Returns the number of animation frames per direction. |
java.lang.String |
getPath()
Returns the relative art path for this image. |
int |
getTile(int dir,
int frame)
Returns the tile number for the specified direction and animation frame for the object. |
java.lang.String |
toString()
Returns a String representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final TileInfo NO_INFO
public static final int NONE
public static final int N
public static final int S
public static final int E
public static final int W
public static final int NE
public static final int NW
public static final int SE
public static final int SW
public static final int U
public static final int D
public static final int NUM_DIRS
Method Detail |
public int getTile(int dir, int frame)
dir
- a wyvern.lib.Direction constantframe
- the animation frame (0 if not animated)
public java.lang.String getName()
public java.lang.String getPath()
public int getNumDirs()
public int getNumFrames()
For example, if there's a "fireball.1" and "fireball.2", then it's 2. If an image group consists of "dog.N", "dog.S", then it's 1. (Basically it returns the highest number it finds at the end of an image group).
public java.lang.String[] getDirs()
public int[] getDirections()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |