|
||||||||||
| 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.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 |
|---|
cz.cuni.amis.pogamut.base.communication.translator.event.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 cz.cuni.amis.pogamut.unreal.communication.messages.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(cz.cuni.amis.pogamut.unreal.communication.messages.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. |
cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
getId()
Unique Id of the item. |
double |
getLastSeenTime()
|
cz.cuni.amis.pogamut.multi.communication.worldview.object.ILocalWorldObject |
getLocal()
|
cz.cuni.amis.pogamut.base.communication.worldview.object.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). |
cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject |
getShared()
|
long |
getSimTime()
|
cz.cuni.amis.pogamut.multi.communication.worldview.object.IStaticWorldObject |
getStatic()
|
protected double |
getTime()
|
ItemType |
getType()
Class of the item (e.g. |
int |
hashCode()
|
protected void |
setTime(double time)
|
String |
toHtmlString()
|
String |
toString()
|
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult |
update(cz.cuni.amis.pogamut.base.communication.worldview.object.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 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
protected int CurrentAmmo
protected int CurrentAltAmmo
protected int Amount
protected ItemType Type
protected ItemDescriptor Descriptor
protected double Time
| Constructor Detail |
|---|
public MyInventory(cz.cuni.amis.pogamut.unreal.communication.messages.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 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
getId in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEventgetId in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectpublic 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 cz.cuni.amis.pogamut.multi.communication.worldview.object.ILocalWorldObject getLocal()
public cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject getShared()
public cz.cuni.amis.pogamut.multi.communication.worldview.object.IStaticWorldObject getStatic()
public long getSimTime()
getSimTime in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEventgetSimTime in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject obj)
update in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEventpublic cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject getObject()
public String toString()
toString in class cz.cuni.amis.pogamut.base.communication.messages.InfoMessagepublic String toHtmlString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||