|
OGS Java API Spec | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ogs.core.BodyPart
A part of the body where items can be equipped. An eqipped item is worn, held, or used somehow. The body part determines how many items can be equipped and how they are equipped. A normal human hand for example can wear one glove, five rings, and hold one item. This class defines humanoid body parts. Body parts of other creatures (such as tails, wings, horns, whatever) may be defined by other classes.
Field Summary | |
static byte |
ARMS
|
static byte |
BACK
|
static byte |
EYES
|
static byte |
HANDS
|
static byte |
HEAD
|
static byte |
LEFT_ARM
|
static byte |
LEFT_EYE
|
static byte |
LEFT_FOOT
|
static byte |
LEFT_HAND
|
static byte |
LEFT_LEG
|
static byte |
LEGS
|
static byte |
NECK
|
static byte |
RIGHT_ARM
|
static byte |
RIGHT_EYE
|
static byte |
RIGHT_FOOT
|
static byte |
RIGHT_HAND
|
static byte |
RIGHT_LEG
|
static byte |
TORSO
|
static byte |
WAIST
|
Constructor Summary | |
BodyPart(Creature creature,
byte type)
Create a new body part. |
Method Summary | |
boolean |
dropItem(Item item)
Drop an item from this body part. |
boolean |
equipItem(Item item)
Equip an item on this body part. |
Creature |
getCreature()
Determine the creature that this body part belongs to. |
Collection |
getItems()
Determine the equipped items for this body part. |
byte |
getType()
Determine the type of this body part. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte HEAD
public static final byte EYES
public static final byte LEFT_EYE
public static final byte RIGHT_EYE
public static final byte NECK
public static final byte TORSO
public static final byte BACK
public static final byte ARMS
public static final byte LEFT_ARM
public static final byte RIGHT_ARM
public static final byte HANDS
public static final byte LEFT_HAND
public static final byte RIGHT_HAND
public static final byte WAIST
public static final byte LEGS
public static final byte LEFT_LEG
public static final byte RIGHT_LEG
public static final byte LEFT_FOOT
public static final byte RIGHT_FOOT
Constructor Detail |
public BodyPart(Creature creature, byte type)
creature
- Creature that this body part belongs to.type
- Type of body part.Method Detail |
public Creature getCreature()
public byte getType()
public Collection getItems()
public boolean equipItem(Item item)
item
- Item to be equipped on this body part.
public boolean dropItem(Item item)
|
OGS Java API Spec | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |