|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.communication.messages.InfoMessage cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventory cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventoryMessage
public class MyInventoryMessage
Implementation of the GameBots2004 message MYINV contains also its Local/Shared/Static subpart class definitions..
Complete message documentation: An object in the observed player's inventory.
Nested Class Summary | |
---|---|
class |
MyInventoryMessage.MyInventoryLocalMessage
Implementation of the local part of the GameBots2004 message MYINV, used to facade MYINVMessage. |
class |
MyInventoryMessage.MyInventorySharedMessage
Implementation of the shared part of the GameBots2004 message MYINV, used to facade MYINVMessage. |
class |
MyInventoryMessage.MyInventoryStaticMessage
Implementation of the static part of the GameBots2004 message MYINV, used to facade MYINVMessage. |
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventory |
---|
MyInventory.MyInventoryUpdate |
Field Summary | |
---|---|
protected int |
Amount
If this item is ammo or armor, this holds the amount of the item the player has. |
protected int |
CurrentAltAmmo
If this item is a weapon, this holds the amount of secondary ammo. |
protected int |
CurrentAmmo
If this item is a weapon, this holds the amount of primary ammo. |
protected ItemDescriptor |
Descriptor
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor. |
protected UnrealId |
Id
Unique Id of the item. |
protected ITeamId |
TeamId
|
protected ItemType |
Type
Class of the item (e.g. |
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventory |
---|
PROTOTYPE, SimTime |
Constructor Summary | |
---|---|
MyInventoryMessage()
Parameter-less contructor for the message. |
|
MyInventoryMessage(MyInventoryMessage original)
Cloning constructor from the full message. |
|
MyInventoryMessage(UnrealId Id,
int CurrentAmmo,
int CurrentAltAmmo,
int Amount,
ItemType Type,
ItemDescriptor Descriptor)
Creates new instance of the message MyInventory. |
Method Summary | |
---|---|
int |
getAmount()
If this item is ammo or armor, this holds the amount of the item the player has. |
int |
getCurrentAltAmmo()
If this item is a weapon, this holds the amount of secondary ammo. |
int |
getCurrentAmmo()
If this item is a weapon, this holds the amount of primary ammo. |
ItemDescriptor |
getDescriptor()
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor. |
UnrealId |
getId()
Unique Id of the item. |
MyInventoryLocal |
getLocal()
|
MyInventoryShared |
getShared()
|
MyInventoryStatic |
getStatic()
|
ITeamId |
getTeamId()
|
ItemType |
getType()
Class of the item (e.g. |
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.MyInventory |
---|
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 int CurrentAmmo
protected int CurrentAltAmmo
protected int Amount
protected ItemType Type
protected ItemDescriptor Descriptor
Constructor Detail |
---|
public MyInventoryMessage()
public MyInventoryMessage(UnrealId Id, int CurrentAmmo, int CurrentAltAmmo, int Amount, ItemType Type, ItemDescriptor Descriptor)
Id
- Unique Id of the item. This Id represents the item in the inventory.CurrentAmmo
- If this item is a weapon, this holds the amount of primary ammo.CurrentAltAmmo
- If this item is a weapon, this holds the amount of secondary ammo.Amount
- If this item is ammo or armor, this holds the amount of the item the player has.Type
- Class of the item (e.g. xWeapons.FlakCannonPickup).Descriptor
- Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.public MyInventoryMessage(MyInventoryMessage original)
original
- Method Detail |
---|
protected void setTeamId(ITeamId TeamId)
public ITeamId getTeamId()
public UnrealId getId()
MyInventory
getId
in interface IWorldObjectUpdatedEvent
getId
in interface IWorldObject
getId
in class MyInventory
public int getCurrentAmmo()
MyInventory
getCurrentAmmo
in class MyInventory
public int getCurrentAltAmmo()
MyInventory
getCurrentAltAmmo
in class MyInventory
public int getAmount()
MyInventory
getAmount
in class MyInventory
public ItemType getType()
MyInventory
getType
in class MyInventory
public ItemDescriptor getDescriptor()
MyInventory
getDescriptor
in class MyInventory
public MyInventoryLocal getLocal()
getLocal
in interface ICompositeWorldObject
public MyInventoryShared getShared()
getShared
in interface ICompositeWorldObject
public MyInventoryStatic getStatic()
getStatic
in interface ICompositeWorldObject
public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
update
in interface IWorldObjectUpdatedEvent
public java.lang.String toString()
toString
in class MyInventory
public java.lang.String toHtmlString()
toHtmlString
in class MyInventory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |