cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class HearNoise

Package class diagram package HearNoise
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.HearNoise
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, cz.cuni.amis.utils.listener.Event

public class HearNoise
extends InfoMessage
implements IWorldEvent, IWorldChangeEvent

Definition of the event HRN.

Complete message documentation: Synchronous message - sent in synchronous batch (events are cached and then exported in the batch due to performance issues). Maybe another player walking or shooting, maybe a bullet hitting the floor or just a nearby lift going up or down. If the very same sound is exported repeatedly (same sound, same source), it won't be exported more than once per second.


Field Summary
protected  double Distance
          How far the noise source is.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  Rotation Rotation
          How should bot rotate if it would like to be in the direction of the "noisy" actor.
protected  long SimTime
           
protected  UnrealId Source
          Unique ID of actor making the noise - may be other player or some other object in the game.
protected  String Type
          What class this actor is - item, projectile, player...
 
Constructor Summary
HearNoise()
          Parameter-less contructor for the message.
HearNoise(HearNoise original)
          Cloning constructor from the full message.
HearNoise(UnrealId Source, String Type, Rotation Rotation, double Distance)
          Creates new instance of the message HearNoise.
 
Method Summary
 double getDistance()
          How far the noise source is.
 Rotation getRotation()
          How should bot rotate if it would like to be in the direction of the "noisy" actor.
 long getSimTime()
          Simulation time in MILLI SECONDS !!!
 UnrealId getSource()
          Unique ID of actor making the noise - may be other player or some other object in the game.
 String getType()
          What class this actor is - item, projectile, player...
protected  void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toJsonLiteral()
           
 String toString()
           
 
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

SimTime

protected long SimTime

Source

protected UnrealId Source
Unique ID of actor making the noise - may be other player or some other object in the game.


Type

protected String Type
What class this actor is - item, projectile, player...


Rotation

protected Rotation Rotation
How should bot rotate if it would like to be in the direction of the "noisy" actor.


Distance

protected double Distance
How far the noise source is.

Constructor Detail

HearNoise

public HearNoise()
Parameter-less contructor for the message.


HearNoise

public HearNoise(UnrealId Source,
                 String Type,
                 Rotation Rotation,
                 double Distance)
Creates new instance of the message HearNoise. Synchronous message - sent in synchronous batch (events are cached and then exported in the batch due to performance issues). Maybe another player walking or shooting, maybe a bullet hitting the floor or just a nearby lift going up or down. If the very same sound is exported repeatedly (same sound, same source), it won't be exported more than once per second. Corresponding GameBots message is HRN.

Parameters:
Source - Unique ID of actor making the noise - may be other player or some other object in the game.
Type - What class this actor is - item, projectile, player...
Rotation - How should bot rotate if it would like to be in the direction of the "noisy" actor.
Distance - How far the noise source is.

HearNoise

public HearNoise(HearNoise original)
Cloning constructor from the full message.

Parameters:
original -
Method Detail

getSimTime

public long getSimTime()
Simulation time in MILLI SECONDS !!!

Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldEvent

setSimTime

protected void setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.


getSource

public UnrealId getSource()
Unique ID of actor making the noise - may be other player or some other object in the game.


getType

public String getType()
What class this actor is - item, projectile, player...


getRotation

public Rotation getRotation()
How should bot rotate if it would like to be in the direction of the "noisy" actor.


getDistance

public double getDistance()
How far the noise source is.


toString

public String toString()
Overrides:
toString in class InfoMessage

toHtmlString

public String toHtmlString()

toJsonLiteral

public String toJsonLiteral()
Overrides:
toJsonLiteral in class InfoMessage


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