|
||||||||||
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.GBEvent cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.PlayerDamaged
public class PlayerDamaged
Asynchronous message. Bot hurt another player. Hit them with a shot. Corresponding GameBots message is HIT.
Field Summary | |
---|---|
protected boolean |
BulletHit
If this damage was caused by bullet. |
protected int |
Damage
Amount of damage done. |
protected String |
DamageType
A string describing what kind of damage. |
protected boolean |
DirectDamage
If the damage is direct. |
protected boolean |
Flaming
If this damage is causing our bot to burn. |
protected UnrealId |
Id
Unique Id of the player hit. |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected boolean |
VehicleHit
If this damage was caused by vehicle running over. |
protected String |
WeaponName
Name of the weapon that caused this damage. |
Constructor Summary | |
---|---|
PlayerDamaged()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package). |
|
PlayerDamaged(PlayerDamaged original)
Cloning constructor. |
|
PlayerDamaged(UnrealId Id,
int Damage,
String DamageType,
String WeaponName,
boolean Flaming,
boolean DirectDamage,
boolean BulletHit,
boolean VehicleHit)
Creates new instance of command PlayerDamaged. |
Method Summary | |
---|---|
int |
getDamage()
Amount of damage done. |
String |
getDamageType()
A string describing what kind of damage. |
UnrealId |
getId()
Unique Id of the player hit. |
long |
getSimTime()
|
String |
getWeaponName()
Name of the weapon that caused this damage. |
boolean |
isBulletHit()
If this damage was caused by bullet. |
boolean |
isDirectDamage()
If the damage is direct. |
boolean |
isFlaming()
If this damage is causing our bot to burn. |
boolean |
isVehicleHit()
If this damage was caused by vehicle running over. |
String |
toHtmlString()
|
String |
toString()
|
Methods inherited from class cz.cuni.amis.pogamut.udk.communication.messages.GBEvent |
---|
getWorldEvent |
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage |
---|
toJsonLiteral |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROTOTYPE
protected UnrealId Id
protected int Damage
protected String DamageType
protected String WeaponName
protected boolean Flaming
protected boolean DirectDamage
protected boolean BulletHit
protected boolean VehicleHit
Constructor Detail |
---|
public PlayerDamaged(UnrealId Id, int Damage, String DamageType, String WeaponName, boolean Flaming, boolean DirectDamage, boolean BulletHit, boolean VehicleHit)
Id
- Unique Id of the player hit.Damage
- Amount of damage done.DamageType
- A string describing what kind of damage.WeaponName
- Name of the weapon that caused this damage.Flaming
- If this damage is causing our bot to burn. TODODirectDamage
- If the damage is direct. TODOBulletHit
- If this damage was caused by bullet.VehicleHit
- If this damage was caused by vehicle running over.public PlayerDamaged(PlayerDamaged original)
public PlayerDamaged()
Method Detail |
---|
public UnrealId getId()
public int getDamage()
public String getDamageType()
public String getWeaponName()
public boolean isFlaming()
public boolean isDirectDamage()
public boolean isBulletHit()
public boolean isVehicleHit()
public long getSimTime()
getSimTime
in interface IWorldChangeEvent
getSimTime
in interface IWorldEvent
getSimTime
in class GBEvent
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 |