cz.cuni.amis.pogamut.usar2004.communication.messages.usarinfomessages
Class KillMessage

Package class diagram package KillMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.usar2004.communication.messages.GBEvent
          extended by cz.cuni.amis.pogamut.usar2004.communication.messages.usarinfomessages.KillMessage
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent, cz.cuni.amis.pogamut.base.communication.translator.event.IWorldEventWrapper, cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, IGBWorldEvent, cz.cuni.amis.utils.listener.Event

public class KillMessage
extends GBEvent
implements cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent

This bot has died. Corresponding GameBots message is DIE.


Field Summary
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  String DamageType
          A string describing what kind of damage killed the bot.
protected  String DeathString
          String describing this type of death.
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 Killer
          Unique Id of player that killed our bot if any (may have walked off a ledge).
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 Summary
KillMessage()
          Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
KillMessage(KillMessage original)
          Cloning constructor.
KillMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Killer, String DamageType, String DeathString, String WeaponName, boolean Flaming, boolean CausedByWorld, boolean DirectDamage, boolean BulletHit, boolean VehicleHit)
          Creates new instance of command KillMessage.
 
Method Summary
 String getDamageType()
          A string describing what kind of damage killed the bot.
 String getDeathString()
          String describing this type of death.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getKiller()
          Unique Id of player that killed our bot if any (may have walked off a ledge).
 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()
          Gets all properties and values to create a HTML formated string;
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.usar2004.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

PROTOTYPE

public static final String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Killer

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Killer
Unique Id of player that killed our bot if any (may have walked off a ledge).


DamageType

protected String DamageType
A string describing what kind of damage killed the bot.


DeathString

protected String DeathString
String describing this type of death.


WeaponName

protected String WeaponName
Name of the weapon that caused this damage.


Flaming

protected boolean Flaming
If this damage is causing our bot to burn. TODO


CausedByWorld

protected boolean CausedByWorld
If this damage was caused by world - falling into lava, or falling down.


DirectDamage

protected boolean DirectDamage
If the damage is direct. TODO


BulletHit

protected boolean BulletHit
If this damage was caused by bullet.


VehicleHit

protected boolean VehicleHit
If this damage was caused by vehicle running over us.

Constructor Detail

KillMessage

public KillMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Killer,
                   String DamageType,
                   String DeathString,
                   String WeaponName,
                   boolean Flaming,
                   boolean CausedByWorld,
                   boolean DirectDamage,
                   boolean BulletHit,
                   boolean VehicleHit)
Creates new instance of command KillMessage.

Parameters:
Killer - Unique Id of player that killed our bot if any (may have walked off a ledge).
DamageType - A string describing what kind of damage killed the bot.
DeathString - String describing this type of death.
WeaponName - Name of the weapon that caused this damage.
Flaming - If this damage is causing our bot to burn. TODO
CausedByWorld - If this damage was caused by world - falling into lava, or falling down.
DirectDamage - If the damage is direct. TODO
BulletHit - If this damage was caused by bullet.
VehicleHit - If this damage was caused by vehicle running over us.

KillMessage

public KillMessage(KillMessage original)
Cloning constructor.


KillMessage

public KillMessage()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).

Method Detail

getKiller

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getKiller()
Unique Id of player that killed our bot if any (may have walked off a ledge).


getDamageType

public String getDamageType()
A string describing what kind of damage killed the bot.


getDeathString

public String getDeathString()
String describing this type of death.


getWeaponName

public String getWeaponName()
Name of the weapon that caused this damage.


isFlaming

public boolean isFlaming()
If this damage is causing our bot to burn. TODO


isCausedByWorld

public boolean isCausedByWorld()
If this damage was caused by world - falling into lava, or falling down.


isDirectDamage

public boolean isDirectDamage()
If the damage is direct. TODO


isBulletHit

public boolean isBulletHit()
If this damage was caused by bullet.


isVehicleHit

public boolean isVehicleHit()
If this damage was caused by vehicle running over us.


getSimTime

public long getSimTime()
Specified by:
getSimTime in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
Specified by:
getSimTime in interface cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent
Overrides:
getSimTime in class GBEvent

toString

public String toString()
Overrides:
toString in class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage

toHtmlString

public String toHtmlString()
Gets all properties and values to create a HTML formated string;

Returns:
Returns all properties in HTML format


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.