|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcz.cuni.amis.pogamut.base.communication.messages.InfoMessage
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemCompositeImpl
public class ItemCompositeImpl

Composite implementation of the INV abstract message. It wraps Local/Shared/Static parts in single object allowing to presenting a nice facade for users.
Complete message documentation: Synchronous/asynchronous message. An object on the ground that can be picked up.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item |
|---|
Item.ItemUpdate, Item.ObjectDisappeared |
| Field Summary | |
|---|---|
protected ItemLocalImpl |
partLocal
|
protected ItemStaticImpl |
partStatic
|
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item |
|---|
PROTOTYPE, SimTime |
| Constructor Summary | |
|---|---|
ItemCompositeImpl()
Parameter-less contructor for the message. |
|
ItemCompositeImpl(ItemCompositeImpl original)
Cloning constructor. |
|
ItemCompositeImpl(ItemLocalImpl partLocal,
ItemSharedImpl partShared,
ItemStaticImpl partStatic)
Composite-impl constructor. |
|
| Method Summary | |
|---|---|
int |
getAmount()
If this item is some ammo or health pack, here we can find out how much of the attribute this item will add. |
ItemDescriptor |
getDescriptor()
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor. |
UnrealId |
getId()
Unique Id of the item. |
ItemLocal |
getLocal()
|
Location |
getLocation()
Location of the item. |
NavPoint |
getNavPoint()
If the Item is not dropped then it's item that is laying at some navpoint and this is that NavPoint instance. |
UnrealId |
getNavPointId()
Id of the navpoint where the item is laying. |
ItemShared |
getShared()
|
ItemStatic |
getStatic()
|
ItemType |
getType()
Class of the item (e.g. |
boolean |
isDropped()
Whether it is regular item or one dropped by some bot (usually during dying). |
boolean |
isReachable()
True if agent can reach the item. |
boolean |
isVisible()
If the item is in the field of view of the bot. |
void |
setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically. |
java.lang.String |
toHtmlString()
|
java.lang.String |
toString()
|
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item |
|---|
createDisappearEvent, getSimTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ItemStaticImpl partStatic
protected ItemLocalImpl partLocal
| Constructor Detail |
|---|
public ItemCompositeImpl()
public ItemCompositeImpl(ItemLocalImpl partLocal,
ItemSharedImpl partShared,
ItemStaticImpl partStatic)
partLocal - local-part of the messagepartShared - shared-part of the messagepartStatic - static-part of the messagepublic ItemCompositeImpl(ItemCompositeImpl original)
original - | Method Detail |
|---|
public void setSimTime(long SimTime)
Item
setSimTime in class Itempublic ItemStatic getStatic()
public ItemLocal getLocal()
public ItemShared getShared()
public UnrealId getId()
Item
getId in interface IWorldObjectgetId in class Itempublic UnrealId getNavPointId()
Item
getNavPointId in class Itempublic NavPoint getNavPoint()
Item
getNavPoint in class Itempublic boolean isVisible()
Item
isVisible in interface IViewableisVisible in class Itempublic Location getLocation()
Item
getLocation in interface ILocatedgetLocation in class Itempublic boolean isReachable()
Item
isReachable in class Itempublic int getAmount()
Item
getAmount in class Itempublic ItemType getType()
Item
getType in interface ItemTypedgetType in class Itempublic ItemDescriptor getDescriptor()
Item
getDescriptor in class Itempublic boolean isDropped()
Item
isDropped in class Itempublic java.lang.String toString()
toString in class Itempublic java.lang.String toHtmlString()
toHtmlString in class Item
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||