Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.rico.adventure.entity.item
Class Item

    java.lang.Object
      de.rico.adventure.entity.AbstractEntity
          de.rico.adventure.entity.item.Item

    public class Item

extends AbstractEntity

This class represents an item in the advenure.

Author:
  Frank Bruns

Constructor Summary
`Item(AbstractMesh mesh)` Creates a new item with the specified mesh as a model.

Method Summary
`boolean` | `canBePickedUp()` Determines whethter or not the item can be picked up by a character.
`OverlayImage` | `getInventoryImage()` Returns the overlay image object that is used as the item's inventory representation.
`void` | `setCanBePickedUp(boolean pickUp)` Sets whethter or not the item can be picked up by a character.
`void` | `setInventoryImage(OverlayImage img)` Sets the inventory image of the item to the specified overlay image object
`void` | `setInventoryImage(java.lang.String filePath)` Sets the inventory image of the item to the specified image specified by the file path.

Methods inherited from class de.rico.adventure.entity.AbstractEntity
`destroy, drawScreenName, getMesh, getScreenName, getScriptId, isEnabled, setEnabled, setScreenName, setScriptId, toString`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Item

    public Item(AbstractMesh mesh)

  Creates a new item with the specified mesh as a model.

  Parameters:
    `mesh` - mesh to use for the item

Method Detail

### setInventoryImage

    public void setInventoryImage(OverlayImage img)

  Sets the inventory image of the item to the specified overlay image object

  Parameters:
    `img` - overlay image for item's invetory representation

### setInventoryImage

    public void setInventoryImage(java.lang.String filePath)

  Sets the inventory image of the item to the specified image specified by the file path.

  Parameters:
    `filePath` - path to image for item's invetory representation

### getInventoryImage

    public OverlayImage getInventoryImage()

  Returns the overlay image object that is used as the item's inventory representation.

  Returns:
    inventory image of the item

### canBePickedUp

    public boolean canBePickedUp()

  Determines whethter or not the item can be picked up by a character.

  Returns:
    can be picked up? --> true=yes, false=no

### setCanBePickedUp

    public void setCanBePickedUp(boolean pickUp)

  Sets whethter or not the item can be picked up by a character.

  Parameters:
    `pickUp` - can be picked up? --> true=yes, false=no

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD