|
||||||||||
| 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.Vehicle
public class Vehicle
Synchronous message. Holds vehicles we see. Id for vehicles doesn't work, so this message is without Id. We can join vehicles by ENTER command if we are close enough - ussually 100 ut units or less. Note: Vehicle support is in alpha testing right now. Corresponding GameBots message is VEH.
| Nested Class Summary | |
|---|---|
static class |
Vehicle.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 int |
Armor
How much the vehicle has left. |
protected UnrealId |
Driver
Unique Id of the driver - if any. |
protected int |
Health
How much health the vehicle has left. |
protected UnrealId |
Id
Unique Id of the vehicle or vehicle part. |
protected Location |
Location
An absolute location of the vehicle within the map. |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected Rotation |
Rotation
Which direction the vehicle is facing in absolute terms. |
protected int |
Team
What team the vehicle is on. |
protected boolean |
TeamLocked
If the vehicle is locked just for its current team. |
protected double |
Time
|
protected String |
Type
Class of the vehicle. |
protected Velocity |
Velocity
Absolute velocity of the vehicle as a vector of movement per one game second. |
protected boolean |
Visible
If the vehicle is in the field of view of the bot. |
| Constructor Summary | |
|---|---|
Vehicle()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package). |
|
Vehicle(UnrealId Id,
Rotation Rotation,
Location Location,
Velocity Velocity,
boolean Visible,
int Team,
int Health,
int Armor,
UnrealId Driver,
boolean TeamLocked,
String Type)
Creates new instance of command Vehicle. |
|
Vehicle(Vehicle original)
Cloning constructor. |
|
Vehicle(Vehicle Original,
boolean Visible)
Used to create event that drops the Visible flag of the item. |
|
| Method Summary | |
|---|---|
IGBWorldObjectDisappeared |
createDisappearEvent()
Creates an update event that has to update visibility to false. |
boolean |
equals(Object obj)
|
int |
getArmor()
How much the vehicle has left. |
UnrealId |
getDriver()
Unique Id of the driver - if any. |
int |
getHealth()
How much health the vehicle has left. |
UnrealId |
getId()
Unique Id of the vehicle or vehicle part. |
double |
getLastSeenTime()
|
ILocalWorldObject |
getLocal()
|
Location |
getLocation()
An absolute location of the vehicle within the map. |
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). |
Rotation |
getRotation()
Which direction the vehicle is facing in absolute terms. |
ISharedWorldObject |
getShared()
|
long |
getSimTime()
|
IStaticWorldObject |
getStatic()
|
int |
getTeam()
What team the vehicle is on. |
protected double |
getTime()
|
String |
getType()
Class of the vehicle. |
Velocity |
getVelocity()
Absolute velocity of the vehicle as a vector of movement per one game second. |
int |
hashCode()
|
boolean |
isTeamLocked()
If the vehicle is locked just for its current team. |
boolean |
isVisible()
If the vehicle 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 Rotation Rotation
protected Location Location
protected Velocity Velocity
protected boolean Visible
protected int Team
protected int Health
protected int Armor
protected UnrealId Driver
protected boolean TeamLocked
protected String Type
protected double Time
| Constructor Detail |
|---|
public Vehicle(UnrealId Id,
Rotation Rotation,
Location Location,
Velocity Velocity,
boolean Visible,
int Team,
int Health,
int Armor,
UnrealId Driver,
boolean TeamLocked,
String Type)
Id - Unique Id of the vehicle or vehicle part.Rotation - Which direction the vehicle is facing in absolute terms.Location - An absolute location of the vehicle within the map.Velocity - Absolute velocity of the vehicle as a vector of movement per one
game second.Visible - If the vehicle is in the field of view of the bot.Team - What team the vehicle is on. 255 is no team. 0-3 are red,
blue, green, gold in that order.Health - How much health the vehicle has left. Ranges from 0 to x, depending on the vehicle type.Armor - How much the vehicle has left. Note: This may be 0 all the time. Maybe the vehicles are not supporting armor.Driver - Unique Id of the driver - if any.TeamLocked - If the vehicle is locked just for its current team.Type - Class of the vehicle. If it is a car, turret etc.public Vehicle(Vehicle original)
public Vehicle()
public Vehicle(Vehicle Original,
boolean Visible)
| Method Detail |
|---|
public UnrealId getId()
getId in interface IWorldObjectUpdatedEventgetId in interface IWorldObjectpublic Rotation getRotation()
getRotation in interface IRotablepublic Location getLocation()
getLocation in interface ILocatedpublic Velocity getVelocity()
getVelocity in interface ILocomotivepublic boolean isVisible()
isVisible in interface IViewablepublic int getTeam()
public int getHealth()
public int getArmor()
public UnrealId getDriver()
public boolean isTeamLocked()
public String getType()
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 | |||||||||