|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwyvern.kernel.combat.slots.AbstractSlot
wyvern.kernel.combat.slots.AbstractArmorSlot
This class serves as the superclass for armor-slot-only body parts.
| Field Summary | |
protected Armor |
armor_
|
| Fields inherited from class wyvern.kernel.combat.slots.AbstractSlot |
layer_ |
| Constructor Summary | |
AbstractArmorSlot()
|
|
| Method Summary | |
protected void |
checkType(Armor armor)
Throws an IllegalArgumentException if the armor isn't of the expected type. |
Armor |
getArmor()
Gets the armor currently in the slot. |
GameObject |
getItem()
Returns the item. |
boolean |
isEmpty()
Returns false if this slot has armor in it. |
void |
remove(GameObject item)
Removes the item in the slot. |
void |
setArmor(Armor armor)
Puts the armor in the slot (nuking what was there before). |
void |
setItem(GameObject item)
Sets the item in this slot. |
java.lang.String |
toString()
Returns String representation. |
| Methods inherited from class wyvern.kernel.combat.slots.AbstractSlot |
getLayer, setLayer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface wyvern.kernel.combat.slots.ArmorSlot |
getArmorType |
| Methods inherited from interface wyvern.kernel.combat.slots.ItemSlot |
getLayer, setLayer |
| Field Detail |
protected Armor armor_
| Constructor Detail |
public AbstractArmorSlot()
| Method Detail |
public boolean isEmpty()
isEmpty in interface ItemSlotpublic Armor getArmor()
getArmor in interface ArmorSlotpublic GameObject getItem()
getItem in interface ItemSlotpublic void setArmor(Armor armor)
setArmor in interface ArmorSlotpublic void setItem(GameObject item)
item - the item to put in the slot (has to be Armor)public void remove(GameObject item)
remove in interface ItemSlotitem - the item to remove.
java.lang.IllegalArgumentException - if the passed item doesn't
match the item in the slot.protected void checkType(Armor armor)
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||