|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--zork2Class.Chest
the class Chest creation :5 mai 03 at 17:51:42
Field Summary | |
static java.lang.String |
IMG_CLOSE_CHEST_DEFAULT_PATH
the default chest's close image |
static java.lang.String |
IMG_OPEN_CHEST_DEFAULT_PATH
the default chest's open image |
Constructor Summary | |
Chest()
create a new chest whith default values posX = 4 posY = 4 key = no_key chest is open open and close image are default images |
Method Summary | |
java.awt.Image |
getImgChestClose()
Returns the chest Close image. |
java.awt.Image |
getImgChestOpen()
Returns the Chest Open image. |
Item |
getItem()
Returns the item contained in the chest. |
java.lang.String |
getKey()
Returns the key which open the chest. |
int |
getPosX()
Returns the chest posX. |
int |
getPosY()
Returns the chest posY. |
boolean |
isOpen()
return true if chest is open |
void |
setImgChestClose(java.awt.Image imgChestClose)
Sets the Chest's Close image. |
void |
setImgChestClose(java.lang.String imgChestClose)
Sets the Chest's Close image. |
void |
setImgChestOpen(java.awt.Image imgChestOpen)
Sets the Chest's Open image. |
void |
setImgChestOpen(java.lang.String imgChestOpen)
Sets the Chest's Open image. |
void |
setIsOpen(boolean isOpen)
Sets if the chest is open. |
void |
setItem(Item item)
Sets the chest's item. |
void |
setKey(java.lang.String key)
Sets the key. |
void |
setPosX(int posX)
Sets the chest's X position. |
void |
setPosY(int posY)
Sets the chest Y position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String IMG_OPEN_CHEST_DEFAULT_PATH
public static java.lang.String IMG_CLOSE_CHEST_DEFAULT_PATH
Constructor Detail |
public Chest()
Method Detail |
public boolean isOpen()
public Item getItem()
public java.lang.String getKey()
public int getPosX()
public int getPosY()
public java.awt.Image getImgChestClose()
public java.awt.Image getImgChestOpen()
public void setIsOpen(boolean isOpen)
isOpen
- the value to set: true if chest is open, false is the chest is closepublic void setItem(Item item)
item
- The item to setpublic void setKey(java.lang.String key)
key
- The key to setpublic void setPosX(int posX)
posX
- The X position to setpublic void setPosY(int posY)
posY
- The Y position to setpublic void setImgChestClose(java.awt.Image imgChestClose)
imgChestClose
- The Chest's Close image to setpublic void setImgChestClose(java.lang.String imgChestClose)
imgChestClose
- a string representing the image location on diskpublic void setImgChestOpen(java.lang.String imgChestOpen)
imgChestOpen
- a string representing the image location on diskpublic void setImgChestOpen(java.awt.Image imgChestOpen)
imgChestOpen
- The Chest's Open image to set
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |