|
|||||||||
| 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.ItemMessage
public class ItemMessage

Implementation of the GameBots2004 message INV contains also its Local/Shared/Static subpart class definitions..
Complete message documentation: Synchronous/asynchronous message. An object on the ground that can be picked up.
| Nested Class Summary | |
|---|---|
class |
ItemMessage.ItemLocalMessage
Implementation of the local part of the GameBots2004 message INV, used to facade INVMessage. |
class |
ItemMessage.ItemSharedMessage
Implementation of the shared part of the GameBots2004 message INV, used to facade INVMessage. |
class |
ItemMessage.ItemStaticMessage
Implementation of the static part of the GameBots2004 message INV, used to facade INVMessage. |
| Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item |
|---|
Item.ItemUpdate, Item.ObjectDisappeared |
| Field Summary | |
|---|---|
protected int |
Amount
If this item is some ammo or health pack, here we can find out how much of the attribute this item will add. |
protected ItemDescriptor |
Descriptor
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor. |
protected boolean |
Dropped
Whether it is regular item or one dropped by some bot (usually during dying). |
protected UnrealId |
Id
Unique Id of the item. |
protected Location |
Location
Location of the item. |
protected NavPoint |
NavPoint
If the Item is not dropped then it's item that is laying at some navpoint and this is that NavPoint instance. |
protected UnrealId |
NavPointId
Id of the navpoint where the item is laying. |
protected boolean |
Reachable
True if agent can reach the item. |
protected ITeamId |
TeamId
|
protected ItemType |
Type
Class of the item (e.g. |
protected boolean |
Visible
If the item is in the field of view of the bot. |
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item |
|---|
PROTOTYPE, SimTime |
| Constructor Summary | |
|---|---|
ItemMessage()
Parameter-less contructor for the message. |
|
ItemMessage(ItemMessage original)
Cloning constructor from the full message. |
|
ItemMessage(UnrealId Id,
UnrealId NavPointId,
NavPoint NavPoint,
boolean Visible,
Location Location,
boolean Reachable,
int Amount,
ItemType Type,
ItemDescriptor Descriptor,
boolean Dropped)
Creates new instance of the message Item. |
|
| 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()
|
ITeamId |
getTeamId()
|
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 |
setNavPoint(NavPoint navPoint)
DO NOT USE THIS METHOD! Reserved for GaviaLib (Pogamut core)! It's used to set correct navpoint instance into the item. |
protected void |
setTeamId(ITeamId TeamId)
Used by Yylex to slip corretn TeamId. |
java.lang.String |
toHtmlString()
|
java.lang.String |
toString()
|
IWorldObjectUpdateResult<IWorldObject> |
update(IWorldObject object)
|
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item |
|---|
createDisappearEvent, getSimTime, setSimTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent |
|---|
getSimTime |
| Field Detail |
|---|
protected ITeamId TeamId
protected UnrealId Id
protected UnrealId NavPointId
protected NavPoint NavPoint
protected boolean Visible
protected Location Location
protected boolean Reachable
protected int Amount
protected ItemType Type
protected ItemDescriptor Descriptor
protected boolean Dropped
| Constructor Detail |
|---|
public ItemMessage()
public ItemMessage(UnrealId Id,
UnrealId NavPointId,
NavPoint NavPoint,
boolean Visible,
Location Location,
boolean Reachable,
int Amount,
ItemType Type,
ItemDescriptor Descriptor,
boolean Dropped)
Id - Unique Id of the item. This Id represents just item on the
map, not in our inventory.NavPointId - Id of the navpoint where the item is laying. If null - the item was dropped by the bot or another player.NavPoint - If the Item is not dropped then it's item that is laying at some navpoint and
this is that NavPoint instance.Visible - If the item is in the field of view of the bot.Location - Location of the item.Reachable - True if agent can reach the item.Amount - If this item is some ammo or health pack, here we can find
out how much of the attribute this item will add.Type - Class of the item (e.g. xWeapons.FlakCannonPickup).Descriptor - Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.Dropped - Whether it is regular item or one dropped by some bot (usually during dying). Items that are not dropped
usually respawns itself (depends on the game settings) while those that are dropped may be taken only once.public ItemMessage(ItemMessage original)
original - | Method Detail |
|---|
protected void setTeamId(ITeamId TeamId)
public ITeamId getTeamId()
public UnrealId getId()
Item
getId in interface IWorldObjectUpdatedEventgetId 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 ItemLocal getLocal()
getLocal in interface ICompositeWorldObjectpublic ItemShared getShared()
getShared in interface ICompositeWorldObjectpublic ItemStatic getStatic()
getStatic in interface ICompositeWorldObjectpublic IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
update in interface IWorldObjectUpdatedEventpublic java.lang.String toString()
toString in class Itempublic java.lang.String toHtmlString()
toHtmlString in class Itempublic void setNavPoint(NavPoint navPoint)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||