|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.communication.messages.InfoMessage cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Vehicle cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.VehicleMessage
public class VehicleMessage
Implementation of the GameBots2004 message VEH contains also its Local/Shared/Static subpart class definitions..
Complete message documentation: 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 aplha testing right now.
Nested Class Summary | |
---|---|
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. |
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Vehicle |
---|
Vehicle.ObjectDisappeared, Vehicle.VehicleUpdate |
Field Summary | |
---|---|
protected java.lang.Integer |
Armor
How much the vehicle has left. |
protected UnrealId |
Driver
Unique Id of the driver - if any. |
protected java.lang.Integer |
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. |
protected Rotation |
Rotation
Which direction the vehicle is facing in absolute terms. |
protected java.lang.Integer |
Team
What team the vehicle is on. |
protected ITeamId |
TeamId
|
protected boolean |
TeamLocked
If the vehicle is locked just for its current team. |
protected java.lang.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. |
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Vehicle |
---|
PROTOTYPE, SimTime |
Constructor Summary | |
---|---|
VehicleMessage()
Parameter-less contructor for the message. |
|
VehicleMessage(UnrealId Id,
Rotation Rotation,
Location Location,
Velocity Velocity,
boolean Visible,
java.lang.Integer Team,
java.lang.Integer Health,
java.lang.Integer Armor,
UnrealId Driver,
boolean TeamLocked,
java.lang.String Type)
Creates new instance of the message Vehicle. |
|
VehicleMessage(VehicleMessage original)
Cloning constructor from the full message. |
Method Summary | |
---|---|
java.lang.Integer |
getArmor()
How much the vehicle has left. |
UnrealId |
getDriver()
Unique Id of the driver - if any. |
java.lang.Integer |
getHealth()
How much health the vehicle has left. |
UnrealId |
getId()
Unique Id of the vehicle or vehicle part. |
VehicleLocal |
getLocal()
|
Location |
getLocation()
An absolute location of the vehicle within the map. |
Rotation |
getRotation()
Which direction the vehicle is facing in absolute terms. |
VehicleShared |
getShared()
|
VehicleStatic |
getStatic()
|
java.lang.Integer |
getTeam()
What team the vehicle is on. |
ITeamId |
getTeamId()
|
java.lang.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. |
java.lang.String |
toHtmlString()
|
java.lang.String |
toString()
|
IWorldObjectUpdateResult<IWorldObject> |
update(IWorldObject object)
|
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Vehicle |
---|
createDisappearEvent, getSimTime, setSimTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent |
---|
getSimTime |
Field Detail |
---|
protected ITeamId TeamId
protected UnrealId Id
protected Rotation Rotation
protected Location Location
protected Velocity Velocity
protected boolean Visible
protected java.lang.Integer Team
protected java.lang.Integer Health
protected java.lang.Integer Armor
protected UnrealId Driver
protected boolean TeamLocked
protected java.lang.String Type
Constructor Detail |
---|
public VehicleMessage()
public VehicleMessage(UnrealId Id, Rotation Rotation, Location Location, Velocity Velocity, boolean Visible, java.lang.Integer Team, java.lang.Integer Health, java.lang.Integer Armor, UnrealId Driver, boolean TeamLocked, java.lang.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
- Method Detail |
---|
protected void setTeamId(ITeamId TeamId)
public ITeamId getTeamId()
public UnrealId getId()
Vehicle
getId
in interface IWorldObjectUpdatedEvent
getId
in interface IWorldObject
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
isVisible
in interface IViewable
isVisible
in class Vehicle
public java.lang.Integer getTeam()
Vehicle
getTeam
in class Vehicle
public java.lang.Integer getHealth()
Vehicle
getHealth
in class Vehicle
public java.lang.Integer getArmor()
Vehicle
getArmor
in class Vehicle
public UnrealId getDriver()
Vehicle
getDriver
in class Vehicle
public boolean isTeamLocked()
Vehicle
isTeamLocked
in class Vehicle
public java.lang.String getType()
Vehicle
getType
in class 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 java.lang.String toString()
toString
in class Vehicle
public java.lang.String toHtmlString()
toHtmlString
in class Vehicle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |