|
||||||||||
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.udk.communication.messages.GBObjectUpdate cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.MyInventory
public class MyInventory
An object in the observed player's inventory. Corresponding GameBots message is MYINV.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent |
---|
IWorldObjectUpdatedEvent.DestroyWorldObject |
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. |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected double |
Time
|
protected ItemType |
Type
Class of the item (e.g. |
Constructor Summary | |
---|---|
MyInventory()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package). |
|
MyInventory(MyInventory original)
Cloning constructor. |
|
MyInventory(UnrealId Id,
int CurrentAmmo,
int CurrentAltAmmo,
int Amount,
ItemType Type,
ItemDescriptor Descriptor)
Creates new instance of command MyInventory. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
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. |
double |
getLastSeenTime()
|
ILocalWorldObject |
getLocal()
|
IWorldObject |
getObject()
Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated). |
ISharedWorldObject |
getShared()
|
long |
getSimTime()
|
IStaticWorldObject |
getStatic()
|
protected double |
getTime()
|
ItemType |
getType()
Class of the item (e.g. |
int |
hashCode()
|
protected void |
setTime(double time)
|
String |
toHtmlString()
|
String |
toString()
|
IWorldObjectUpdateResult |
update(IWorldObject obj)
|
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage |
---|
toJsonLiteral |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROTOTYPE
protected UnrealId Id
protected int CurrentAmmo
protected int CurrentAltAmmo
protected int Amount
protected ItemType Type
protected ItemDescriptor Descriptor
protected double Time
Constructor Detail |
---|
public MyInventory(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. LinkGun.WeaponPickup).Descriptor
- Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.public MyInventory(MyInventory original)
public MyInventory()
Method Detail |
---|
public UnrealId getId()
getId
in interface IWorldObjectUpdatedEvent
getId
in interface IWorldObject
public int getCurrentAmmo()
public int getCurrentAltAmmo()
public int getAmount()
public ItemType getType()
public ItemDescriptor getDescriptor()
protected double getTime()
protected void setTime(double time)
public double getLastSeenTime()
public ILocalWorldObject getLocal()
public ISharedWorldObject getShared()
public IStaticWorldObject getStatic()
public long getSimTime()
getSimTime
in interface IWorldChangeEvent
getSimTime
in interface IWorldObject
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public IWorldObjectUpdateResult update(IWorldObject obj)
update
in interface IWorldObjectUpdatedEvent
public IWorldObject getObject()
public String toString()
toString
in class InfoMessage
public String toHtmlString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |