|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.communication.messages.InfoMessage
cz.cuni.amis.pogamut.udk.communication.messages.GBObjectUpdate
cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.Mover
public class 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 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 |
|---|
public static final String PROTOTYPE
protected UnrealId Id
protected Location Location
protected boolean Visible
protected boolean Reachable
protected boolean DamageTrig
protected String Type
protected boolean IsMoving
protected Velocity Velocity
protected double MoveTime
protected double OpenTime
protected Location BasePos
protected Location BaseRot
protected double DelayTime
protected String State
protected UnrealId NavPointMarker
protected double Time
| Constructor Detail |
|---|
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)
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.public Mover(Mover original)
public Mover()
public Mover(Mover Original,
boolean Visible)
| Method Detail |
|---|
public UnrealId getId()
getId in interface IWorldObjectUpdatedEventgetId in interface IWorldObjectpublic Location getLocation()
getLocation in interface ILocatedpublic boolean isVisible()
isVisible in interface IViewablepublic boolean isReachable()
public boolean isDamageTrig()
public String getType()
public boolean isIsMoving()
public Velocity getVelocity()
getVelocity in interface ILocomotivepublic double getMoveTime()
public double getOpenTime()
public Location getBasePos()
public Location getBaseRot()
public double getDelayTime()
public String getState()
public UnrealId getNavPointMarker()
protected double getTime()
protected void setTime(double time)
public double getLastSeenTime()
public ILocalWorldObject getLocal()
getLocal in interface ICompositeWorldObjectpublic ISharedWorldObject getShared()
getShared in interface ICompositeWorldObjectpublic IStaticWorldObject getStatic()
getStatic in interface ICompositeWorldObjectpublic long getSimTime()
getSimTime in interface IWorldChangeEventgetSimTime in interface IWorldObjectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic IGBWorldObjectDisappeared createDisappearEvent()
IGBViewable
createDisappearEvent in interface IGBViewablepublic IWorldObjectUpdateResult update(IWorldObject obj)
update in interface IWorldObjectUpdatedEventpublic IWorldObject getObject()
public String toString()
toString in class InfoMessagepublic String toHtmlString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||