cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages
Class Mover

Package class diagram package Mover
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.udk.communication.messages.GBObjectUpdate
          extended by cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.Mover
All Implemented Interfaces:
IWorldChangeEvent, IWorldObjectUpdatedEvent, IWorldObject, ILocated, ILocomotive, IViewable, ICompositeWorldObject, IGBViewable, IGBWorldObjectEvent, cz.cuni.amis.utils.listener.Event

public class Mover
extends GBObjectUpdate
implements IGBWorldObjectEvent, IWorldObject, ILocated, ILocomotive, IGBViewable

Synchronous message. Movers can be doors, elevators, or any other chunk of architecture that can move. They generally need to be either run into, or activated by shooting or pressing a button. We are working on ways to provide bots with more of the information they need to deal with movers appropriately. Corresponding GameBots message is MOV.


Nested Class Summary
static class Mover.ObjectDisappeared
          Used to drop Visible flag from the object.
 
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
IWorldObjectUpdatedEvent.DestroyWorldObject
 
Field Summary
protected  Location BasePos
          Base position of the mover.
protected  Location BaseRot
          Base rotation of the mover.
protected  boolean DamageTrig
          True if the mover needs to be shot to be activated.
protected  double DelayTime
          Delay before starting to open (or before lift starts to move).
protected  UnrealId Id
          A unique Id of this mover assigned by the game.
protected  boolean IsMoving
          Does the mover move right now?
protected  Location Location
          Location of the mover.
protected  double MoveTime
          How long the mover moves, when it becomes triggered, before it stops.
protected  UnrealId NavPointMarker
          Navigation point marking this mover.
protected  double OpenTime
          How long the mover stands still when it reaches its destination position.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  boolean Reachable
          True if the bot can run here, false otherwise.
protected  String State
          Name of the state Mover is currently in.
protected  double Time
           
protected  String Type
          String class of the mover.
protected  Velocity Velocity
          Velocity vector.
protected  boolean Visible
          If the mover is in the field of view of the bot.
 
Constructor Summary
Mover()
          Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package).
Mover(Mover original)
          Cloning constructor.
Mover(Mover Original, boolean Visible)
          Used to create event that drops the Visible flag of the item.
Mover(UnrealId Id, Location Location, boolean Visible, boolean Reachable, boolean DamageTrig, String Type, boolean IsMoving, Velocity Velocity, double MoveTime, double OpenTime, Location BasePos, Location BaseRot, double DelayTime, String State, UnrealId NavPointMarker)
          Creates new instance of command Mover.
 
Method Summary
 IGBWorldObjectDisappeared createDisappearEvent()
          Creates an update event that has to update visibility to false.
 boolean equals(Object obj)
           
 Location getBasePos()
          Base position of the mover.
 Location getBaseRot()
          Base rotation of the mover.
 double getDelayTime()
          Delay before starting to open (or before lift starts to move).
 UnrealId getId()
          A unique Id of this mover assigned by the game.
 double getLastSeenTime()
           
 ILocalWorldObject getLocal()
           
 Location getLocation()
          Location of the mover.
 double getMoveTime()
          How long the mover moves, when it becomes triggered, before it stops.
 UnrealId getNavPointMarker()
          Navigation point marking this mover.
 IWorldObject getObject()
          Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated).
 double getOpenTime()
          How long the mover stands still when it reaches its destination position.
 ISharedWorldObject getShared()
           
 long getSimTime()
           
 String getState()
          Name of the state Mover is currently in.
 IStaticWorldObject getStatic()
           
protected  double getTime()
           
 String getType()
          String class of the mover.
 Velocity getVelocity()
          Velocity vector.
 int hashCode()
           
 boolean isDamageTrig()
          True if the mover needs to be shot to be activated.
 boolean isIsMoving()
          Does the mover move right now?
 boolean isReachable()
          True if the bot can run here, false otherwise.
 boolean isVisible()
          If the mover is in the field of view of the bot.
protected  void setTime(double time)
           
 String toHtmlString()
           
 String toString()
           
 IWorldObjectUpdateResult update(IWorldObject obj)
           
 
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
toJsonLiteral
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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

Id

protected UnrealId Id
A unique Id of this mover assigned by the game.


Location

protected Location Location
Location of the mover.


Visible

protected boolean Visible
If the mover is in the field of view of the bot.


Reachable

protected boolean Reachable
True if the bot can run here, false otherwise.


DamageTrig

protected boolean DamageTrig
True if the mover needs to be shot to be activated.


Type

protected String Type
String class of the mover.


IsMoving

protected boolean IsMoving
Does the mover move right now?


Velocity

protected Velocity Velocity
Velocity vector.


MoveTime

protected double MoveTime
How long the mover moves, when it becomes triggered, before it stops.


OpenTime

protected double OpenTime
How long the mover stands still when it reaches its destination position. After this time, the mover returns back to its initial position.


BasePos

protected Location BasePos
Base position of the mover.


BaseRot

protected Location BaseRot
Base rotation of the mover.


DelayTime

protected double DelayTime
Delay before starting to open (or before lift starts to move).


State

protected String State
Name of the state Mover is currently in. Can be used to determine the type of the mover.


NavPointMarker

protected UnrealId NavPointMarker
Navigation point marking this mover. We can parse this Id to get information about type of the mover. Marker Id contains "lift" string if it is a lift, "door" string if it is a door, etc.


Time

protected double Time
Constructor Detail

Mover

public Mover(UnrealId Id,
             Location Location,
             boolean Visible,
             boolean Reachable,
             boolean DamageTrig,
             String Type,
             boolean IsMoving,
             Velocity Velocity,
             double MoveTime,
             double OpenTime,
             Location BasePos,
             Location BaseRot,
             double DelayTime,
             String State,
             UnrealId NavPointMarker)
Creates new instance of command Mover. Synchronous message. Movers can be doors, elevators, or any other chunk of architecture that can move. They generally need to be either run into, or activated by shooting or pressing a button. We are working on ways to provide bots with more of the information they need to deal with movers appropriately. Corresponding GameBots message for this command is .

Parameters:
Id - A unique Id of this mover assigned by the game.
Location - Location of the mover.
Visible - If the mover is in the field of view of the bot.
Reachable - True if the bot can run here, false otherwise.
DamageTrig - True if the mover needs to be shot to be activated.
Type - String class of the mover.
IsMoving - Does the mover move right now?
Velocity - Velocity vector.
MoveTime - How long the mover moves, when it becomes triggered, before it stops.
OpenTime - How long the mover stands still when it reaches its destination position. After this time, the mover returns back to its initial position.
BasePos - Base position of the mover.
BaseRot - Base rotation of the mover.
DelayTime - Delay before starting to open (or before lift starts to move).
State - Name of the state Mover is currently in. Can be used to determine the type of the mover.
NavPointMarker - Navigation point marking this mover. We can parse this Id to get information about type of the mover. Marker Id contains "lift" string if it is a lift, "door" string if it is a door, etc.

Mover

public Mover(Mover original)
Cloning constructor.


Mover

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


Mover

public Mover(Mover Original,
             boolean Visible)
Used to create event that drops the Visible flag of the item.

Method Detail

getId

public UnrealId getId()
A unique Id of this mover assigned by the game.

Specified by:
getId in interface IWorldObjectUpdatedEvent
Specified by:
getId in interface IWorldObject

getLocation

public Location getLocation()
Location of the mover.

Specified by:
getLocation in interface ILocated

isVisible

public boolean isVisible()
If the mover is in the field of view of the bot.

Specified by:
isVisible in interface IViewable

isReachable

public boolean isReachable()
True if the bot can run here, false otherwise.


isDamageTrig

public boolean isDamageTrig()
True if the mover needs to be shot to be activated.


getType

public String getType()
String class of the mover.


isIsMoving

public boolean isIsMoving()
Does the mover move right now?


getVelocity

public Velocity getVelocity()
Velocity vector.

Specified by:
getVelocity in interface ILocomotive

getMoveTime

public double getMoveTime()
How long the mover moves, when it becomes triggered, before it stops.


getOpenTime

public double getOpenTime()
How long the mover stands still when it reaches its destination position. After this time, the mover returns back to its initial position.


getBasePos

public Location getBasePos()
Base position of the mover.


getBaseRot

public Location getBaseRot()
Base rotation of the mover.


getDelayTime

public double getDelayTime()
Delay before starting to open (or before lift starts to move).


getState

public String getState()
Name of the state Mover is currently in. Can be used to determine the type of the mover.


getNavPointMarker

public UnrealId getNavPointMarker()
Navigation point marking this mover. We can parse this Id to get information about type of the mover. Marker Id contains "lift" string if it is a lift, "door" string if it is a door, etc.


getTime

protected double getTime()

setTime

protected void setTime(double time)

getLastSeenTime

public double getLastSeenTime()

getLocal

public ILocalWorldObject getLocal()
Specified by:
getLocal in interface ICompositeWorldObject

getShared

public ISharedWorldObject getShared()
Specified by:
getShared in interface ICompositeWorldObject

getStatic

public IStaticWorldObject getStatic()
Specified by:
getStatic in interface ICompositeWorldObject

getSimTime

public long getSimTime()
Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldObject

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

createDisappearEvent

public IGBWorldObjectDisappeared createDisappearEvent()
Description copied from interface: IGBViewable
Creates an update event that has to update visibility to false.

Specified by:
createDisappearEvent in interface IGBViewable
Returns:

update

public IWorldObjectUpdateResult update(IWorldObject obj)
Specified by:
update in interface IWorldObjectUpdatedEvent

getObject

public IWorldObject getObject()
Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated).


toString

public String toString()
Overrides:
toString in class InfoMessage

toHtmlString

public String toHtmlString()


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