|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.properties.Appearance
This property encapsulates an object's bitmap & category, and updates the bitmap number (a reference into the bitmap database) every time either is changed.
Field Summary | |
static int |
ACTIVE_LAYER
Layer for airborne objects such as spells, missiles. |
static int |
DYNAMIC_LAYER
The default layer that objects are placed in if they have no special drawing properties. |
static int |
FIXED_LAYER
Layer for buildings, signs, and other fixed objects. |
static int |
GROUND_LAYER
Layer for the terrain. |
static int |
INVISIBLE
A value indicating that an object specifically desires to be invisible. |
static int |
LIGHTING_LAYER
Layer for lighting (actually, darkness) effects. |
static int |
LIVING_LAYER
Layer for living objects. |
static int |
UNDERGROUND
Put objects in this layer to hide them from view. |
static int |
WEATHER_LAYER
Layer for weather and atmospheric effects. |
Fields inherited from interface wyvern.lib.Direction.Dirs |
DOWN, E, EAST, ILLEGAL_DIR, N, NE, NONE, NORTH, NW, S, SE, SOUTH, SW, UP, W, WEST |
Constructor Summary | |
Appearance()
Constructs a new Appearance. |
|
Appearance(GameObject obj)
Constructs a new Appearance for the specified GameObject. |
|
Appearance(java.lang.String cat,
java.lang.String bmp,
GameObject obj)
Constructs a new Appearance. |
Method Summary | |
java.lang.Object |
createClone()
Clones the property so that instances get their own copy. |
void |
cycleFrame()
Moves to next frame in animation cycle. |
void |
destroy()
Dismantles this Appearance object. |
boolean |
equals(java.lang.Object o)
Returns true if the passed appearance matches this one well enough for them to pass as "equal". |
int |
getAlpha()
Returns the alpha value for this appearance (1-100). |
java.lang.String |
getBitmap()
Returns the underlying bitmap string for this property. |
java.lang.String |
getCategory()
Returns the underlying bitmap category for this property. |
int |
getDirection()
Returns the direction this object is facing. |
int |
getFrame()
Returns the current animation frame number for the appearance. |
GameObject |
getGameObject()
Returns the object we're the Appearance for. |
java.lang.String |
getImage()
Returns the image (category + bmp) |
TileInfo |
getInfo()
Returns the TileInfo for this category/bitmap, if any. |
int |
getLayer()
Retrieves the drawing layer for this object. |
int |
getTile()
Returns the underlying bitmap number for this property. |
int |
hashCode()
Returns the hashcode for this object. |
static java.lang.String |
layerToString(int layer)
Returns a string representation of a layer constant. |
void |
resetNumber()
Resets the bitmap number from the bitmap & category (and if present, direction and animation frame). |
void |
setAlpha(int alpha)
Sets the alpha value for this appearance (1-100). |
void |
setBitmap(java.lang.String bitmap)
Sets the underlying Bitmap string for this property. |
void |
setCategory(java.lang.String category)
Sets the underlying category string for this object. |
void |
setDirection(int dir)
Sets the direction for this object. |
void |
setFrame(int frame)
Sets the current animation frame number for the appearance. |
void |
setGameObject(GameObject obj)
Sets the object we negotiate with over the appearance. |
void |
setImage(java.lang.String image)
Sets the image (relative path + filename) for this object. |
void |
setImage(java.lang.String category,
java.lang.String bmp)
Sets the image (relative path + filename) for this object. |
void |
setLayer(int layer)
Sets the drawing layer for this object. |
java.lang.String |
toString()
Prints out a String representation of this Appearance. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UNDERGROUND
public static final int GROUND_LAYER
public static final int FIXED_LAYER
public static final int DYNAMIC_LAYER
public static final int LIVING_LAYER
public static final int ACTIVE_LAYER
public static final int WEATHER_LAYER
public static final int LIGHTING_LAYER
public static final int INVISIBLE
Constructor Detail |
public Appearance()
public Appearance(GameObject obj)
public Appearance(java.lang.String cat, java.lang.String bmp, GameObject obj)
Method Detail |
public static java.lang.String layerToString(int layer)
layer
- the drawing layer
public java.lang.String getBitmap()
public java.lang.String getCategory()
public int getTile()
public void setBitmap(java.lang.String bitmap)
bitmap
- the bitmap string to use for the objectpublic void setCategory(java.lang.String category)
category
- the database category to use for the objectpublic void setImage(java.lang.String category, java.lang.String bmp)
public void setImage(java.lang.String image)
image
- a relative image, such as "players/paladin_male",
or "wiz/foobar/hof/bigdude"public java.lang.String getImage()
public int getLayer()
public void setLayer(int layer)
layer
- the new layerpublic int getAlpha()
public void setAlpha(int alpha)
alpha
- the alpha valuepublic void setFrame(int frame)
public int getFrame()
public void setDirection(int dir)
dir
- a valid wyvern.lib.Direction constant, including
Direction.NONE. Direction.ILLEGAL_DIR is not a valid parameter.public int getDirection()
public void setGameObject(GameObject obj)
public GameObject getGameObject()
public void resetNumber()
public void cycleFrame()
public TileInfo getInfo()
public java.lang.String toString()
public java.lang.Object createClone()
createClone
in interface MutableProperty
public boolean equals(java.lang.Object o)
o
- another Appearance objectpublic int hashCode()
public void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |