public class VehicleMessage extends Vehicle implements IWorldObjectUpdatedEvent, ICompositeWorldObjectUpdatedEvent
Modifier and Type | Class and Description |
---|---|
class |
VehicleMessage.VehicleLocalMessage
Implementation of the local part of the GameBots2004 message VEH, used
to facade VEHMessage.
|
class |
VehicleMessage.VehicleSharedMessage
Implementation of the shared part of the GameBots2004 message VEH, used
to facade VEHMessage.
|
class |
VehicleMessage.VehicleStaticMessage
Implementation of the static part of the GameBots2004 message VEH, used
to facade VEHMessage.
|
Vehicle.ObjectDisappeared, Vehicle.VehicleUpdate
IWorldObjectUpdatedEvent.DestroyWorldObject
Modifier and Type | Field and Description |
---|---|
protected Integer |
Armor
How much the vehicle has left.
|
protected boolean |
Armor_Set
Whether property 'Armor' was received from GB2004.
|
protected UnrealId |
Driver
Unique Id of the driver - if any.
|
protected boolean |
Driver_Set
Whether property 'Driver' was received from GB2004.
|
protected Integer |
Health
How much health the vehicle has left.
|
protected boolean |
Health_Set
Whether property 'Health' was received from GB2004.
|
protected UnrealId |
Id
Unique Id of the vehicle or vehicle part.
|
protected boolean |
Id_Set
Whether property 'Id' was received from GB2004.
|
protected Location |
Location
An absolute location of the vehicle within the map.
|
protected boolean |
Location_Set
Whether property 'Location' was received from GB2004.
|
protected Rotation |
Rotation
Which direction the vehicle is facing in absolute terms.
|
protected boolean |
Rotation_Set
Whether property 'Rotation' was received from GB2004.
|
protected Integer |
Team
What team the vehicle is on.
|
protected boolean |
Team_Set
Whether property 'Team' was received from GB2004.
|
protected ITeamId |
TeamId |
protected boolean |
TeamLocked
If the vehicle is locked just for its current team.
|
protected boolean |
TeamLocked_Set
Whether property 'TeamLocked' was received from GB2004.
|
protected String |
Type
Class of the vehicle.
|
protected boolean |
Type_Set
Whether property 'Type' was received from GB2004.
|
protected Velocity |
Velocity
Absolute velocity of the vehicle as a vector of movement per one
game second.
|
protected boolean |
Velocity_Set
Whether property 'Velocity' was received from GB2004.
|
protected boolean |
Visible
If the vehicle is in the field of view of the bot.
|
protected boolean |
Visible_Set
Whether property 'Visible' was received from GB2004.
|
Constructor and Description |
---|
VehicleMessage()
Parameter-less contructor for the message.
|
VehicleMessage(UnrealId Id,
Rotation Rotation,
Location Location,
Velocity Velocity,
boolean Visible,
Integer Team,
Integer Health,
Integer Armor,
UnrealId Driver,
boolean TeamLocked,
String Type)
Creates new instance of the message Vehicle.
|
VehicleMessage(VehicleMessage original)
Cloning constructor from the full message.
|
Modifier and Type | Method and Description |
---|---|
Integer |
getArmor()
How much the vehicle has left.
|
UnrealId |
getDriver()
Unique Id of the driver - if any.
|
Integer |
getHealth()
How much health the vehicle has left.
|
UnrealId |
getId()
Unique Id of the vehicle or vehicle part.
|
VehicleLocal |
getLocal() |
ILocalWorldObjectUpdatedEvent |
getLocalEvent() |
Location |
getLocation()
An absolute location of the vehicle within the map.
|
Rotation |
getRotation()
Which direction the vehicle is facing in absolute terms.
|
VehicleShared |
getShared() |
ISharedWorldObjectUpdatedEvent |
getSharedEvent() |
VehicleStatic |
getStatic() |
IStaticWorldObjectUpdatedEvent |
getStaticEvent() |
Integer |
getTeam()
What team the vehicle is on.
|
ITeamId |
getTeamId() |
String |
getType()
Class of the vehicle.
|
Velocity |
getVelocity()
Absolute velocity of the vehicle as a vector of movement per one
game second.
|
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 |
setTeamId(ITeamId TeamId)
Used by Yylex to slip corretn TeamId.
|
String |
toHtmlString() |
String |
toString() |
IWorldObjectUpdateResult<IWorldObject> |
update(IWorldObject object) |
createDisappearEvent, getSimTime, setSimTime, toJsonLiteral
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSimTime
protected ITeamId TeamId
protected UnrealId Id
protected boolean Id_Set
protected Rotation Rotation
protected boolean Rotation_Set
protected Location Location
protected boolean Location_Set
protected Velocity Velocity
protected boolean Velocity_Set
protected boolean Visible
protected boolean Visible_Set
protected Integer Team
protected boolean Team_Set
protected Integer Health
protected boolean Health_Set
protected Integer Armor
protected boolean Armor_Set
protected UnrealId Driver
protected boolean Driver_Set
protected boolean TeamLocked
protected boolean TeamLocked_Set
protected String Type
protected boolean Type_Set
public VehicleMessage()
public VehicleMessage(UnrealId Id, Rotation Rotation, Location Location, Velocity Velocity, boolean Visible, Integer Team, Integer Health, Integer 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 VehicleMessage(VehicleMessage original)
original
- protected void setTeamId(ITeamId TeamId)
public ITeamId getTeamId()
public UnrealId getId()
Vehicle
getId
in interface IWorldObjectUpdatedEvent
getId
in interface IWorldObject
getId
in interface ICompositeWorldObjectUpdatedEvent
getId
in class Vehicle
public Rotation getRotation()
Vehicle
getRotation
in interface IRotable
getRotation
in class Vehicle
public Location getLocation()
Vehicle
getLocation
in interface ILocated
getLocation
in class Vehicle
public Velocity getVelocity()
Vehicle
getVelocity
in interface ILocomotive
getVelocity
in class Vehicle
public boolean isVisible()
Vehicle
public Integer getTeam()
Vehicle
public Integer getHealth()
Vehicle
public Integer getArmor()
Vehicle
public UnrealId getDriver()
Vehicle
public boolean isTeamLocked()
Vehicle
isTeamLocked
in class Vehicle
public String getType()
Vehicle
public VehicleLocal getLocal()
getLocal
in interface ICompositeWorldObject
public VehicleShared getShared()
getShared
in interface ICompositeWorldObject
public VehicleStatic getStatic()
getStatic
in interface ICompositeWorldObject
public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
update
in interface IWorldObjectUpdatedEvent
public ILocalWorldObjectUpdatedEvent getLocalEvent()
getLocalEvent
in interface ICompositeWorldObjectUpdatedEvent
public ISharedWorldObjectUpdatedEvent getSharedEvent()
getSharedEvent
in interface ICompositeWorldObjectUpdatedEvent
public IStaticWorldObjectUpdatedEvent getStaticEvent()
getStaticEvent
in interface ICompositeWorldObjectUpdatedEvent
public String toHtmlString()
toHtmlString
in class Vehicle
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.