public class PlayerDamaged extends GBEvent implements IWorldEvent, IWorldChangeEvent
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
getWorldEventtoJsonLiteralpublic 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
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()
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 IWorldChangeEventgetSimTime in interface IWorldEventgetSimTime in class GBEventpublic String toString()
toString in class InfoMessagepublic String toHtmlString()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.