public class ChangedWeapon extends InfoMessage implements IWorldEvent, IWorldChangeEvent
| Modifier and Type | Field and Description |
|---|---|
protected String |
Id
Unique Id of new weapon, based on the inventory weapon's
name (this is different from the Id of the weapon that can
be picked up in the map).
|
protected int |
PrimaryAmmo
Holding current primary ammo of the new weapon.
|
static String |
PROTOTYPE
Example how the message looks like - used during parser tests.
|
protected int |
SecondaryAmmo
Holding current secondary ammo of the new weapon.
|
protected long |
SimTime |
protected String |
Type
A string representing the type of the weapon.
|
| Constructor and Description |
|---|
ChangedWeapon()
Parameter-less contructor for the message.
|
ChangedWeapon(ChangedWeapon original)
Cloning constructor from the full message.
|
ChangedWeapon(String Id,
int PrimaryAmmo,
int SecondaryAmmo,
String Type)
Creates new instance of the message ChangedWeapon.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Unique Id of new weapon, based on the inventory weapon's
name (this is different from the Id of the weapon that can
be picked up in the map).
|
int |
getPrimaryAmmo()
Holding current primary ammo of the new weapon.
|
int |
getSecondaryAmmo()
Holding current secondary ammo of the new weapon.
|
long |
getSimTime()
Simulation time in MILLI SECONDS !!!
|
String |
getType()
A string representing the type of the weapon.
|
protected void |
setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.
|
String |
toHtmlString() |
String |
toJsonLiteral() |
String |
toString() |
public static final String PROTOTYPE
protected long SimTime
protected String Id
protected int PrimaryAmmo
protected int SecondaryAmmo
protected String Type
public ChangedWeapon()
public ChangedWeapon(String Id, int PrimaryAmmo, int SecondaryAmmo, String Type)
Id - Unique Id of new weapon, based on the inventory weapon's
name (this is different from the Id of the weapon that can
be picked up in the map).PrimaryAmmo - Holding current primary ammo of the new weapon.SecondaryAmmo - Holding current secondary ammo of the new weapon.Type - A string representing the type of the weapon.public ChangedWeapon(ChangedWeapon original)
original - public long getSimTime()
getSimTime in interface IWorldChangeEventgetSimTime in interface IWorldEventprotected void setSimTime(long SimTime)
public String getId()
public int getPrimaryAmmo()
public int getSecondaryAmmo()
public String getType()
public String toString()
toString in class InfoMessagepublic String toHtmlString()
public String toJsonLiteral()
toJsonLiteral in class InfoMessageCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.