public class BotDamaged extends GBEvent implements cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
Modifier and Type | Field and Description |
---|---|
protected boolean |
BulletHit
If this damage was caused by bullet.
|
protected boolean |
CausedByWorld
If this damage was caused by world - falling into lava, or falling down.
|
protected int |
Damage
Amount of damage taken.
|
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 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
Instigator
Id of the player who is damaging the bot, filled only if
instigator is in the field of view of the bot.
|
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 us.
|
protected String |
WeaponName
Name of the weapon that caused this damage.
|
Constructor and Description |
---|
BotDamaged()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
|
BotDamaged(BotDamaged original)
Cloning constructor.
|
BotDamaged(int Damage,
String DamageType,
String WeaponName,
boolean Flaming,
boolean CausedByWorld,
boolean DirectDamage,
boolean BulletHit,
boolean VehicleHit,
cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Instigator)
Creates new instance of command BotDamaged.
|
Modifier and Type | Method and Description |
---|---|
int |
getDamage()
Amount of damage taken.
|
String |
getDamageType()
A string describing what kind of damage.
|
cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
getInstigator()
Id of the player who is damaging the bot, filled only if
instigator is in the field of view of the bot.
|
long |
getSimTime() |
String |
getWeaponName()
Name of the weapon that caused this damage.
|
boolean |
isBulletHit()
If this damage was caused by bullet.
|
boolean |
isCausedByWorld()
If this damage was caused by world - falling into lava, or falling down.
|
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 us.
|
String |
toHtmlString() |
String |
toString() |
getWorldEvent
public static final String PROTOTYPE
protected int Damage
protected String DamageType
protected String WeaponName
protected boolean Flaming
protected boolean CausedByWorld
protected boolean DirectDamage
protected boolean BulletHit
protected boolean VehicleHit
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Instigator
public BotDamaged(int Damage, String DamageType, String WeaponName, boolean Flaming, boolean CausedByWorld, boolean DirectDamage, boolean BulletHit, boolean VehicleHit, cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Instigator)
Damage
- Amount of damage taken.DamageType
- A string describing what kind of damage.WeaponName
- Name of the weapon that caused this damage. Not sent right now.Flaming
- If this damage is causing our bot to burn. TODOCausedByWorld
- If this damage was caused by world - falling into lava, or falling down.DirectDamage
- If the damage is direct. TODOBulletHit
- If this damage was caused by bullet.VehicleHit
- If this damage was caused by vehicle running over us.Instigator
- Id of the player who is damaging the bot, filled only if
instigator is in the field of view of the bot.public BotDamaged(BotDamaged original)
public BotDamaged()
public int getDamage()
public String getDamageType()
public String getWeaponName()
public boolean isFlaming()
public boolean isCausedByWorld()
public boolean isDirectDamage()
public boolean isBulletHit()
public boolean isVehicleHit()
public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getInstigator()
public long getSimTime()
getSimTime
in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
getSimTime
in interface cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent
getSimTime
in class GBEvent
public String toString()
toString
in class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
public String toHtmlString()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.