cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class VehicleSharedImpl

Package class diagram package VehicleSharedImpl
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.VehicleShared
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.VehicleSharedImpl
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated, cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotive, cz.cuni.amis.pogamut.base3d.worldview.object.IRotable, cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject, Cloneable

public class VehicleSharedImpl
extends VehicleShared

Implementation of the shared part of the GameBots2004 message VEH.

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
static class VehicleSharedImpl.VehicleSharedUpdate
           
 
Field Summary
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
          Unique Id of the vehicle or vehicle part.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.IntegerProperty myArmor
          How much the vehicle has left.
protected  UnrealIdProperty myDriver
          Unique Id of the driver - if any.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.IntegerProperty myHealth
          How much health the vehicle has left.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.LocationProperty myLocation
          An absolute location of the vehicle within the map.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.RotationProperty myRotation
          Which direction the vehicle is facing in absolute terms.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.IntegerProperty myTeam
          What team the vehicle is on.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.BooleanProperty myTeamLocked
          If the vehicle is locked just for its current team.
protected  cz.cuni.amis.pogamut.multi.communication.worldview.property.VelocityProperty myVelocity
          Absolute velocity of the vehicle as a vector of movement per one game second.
protected  HashMap<cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId,cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.VehicleShared
ArmorPropertyToken, DriverPropertyToken, HealthPropertyToken, LocationPropertyToken, RotationPropertyToken, SharedPropertyTokens, SimTime, TeamLockedPropertyToken, TeamPropertyToken, VelocityPropertyToken
 
Constructor Summary
VehicleSharedImpl(VehicleSharedImpl source)
           
VehicleSharedImpl(cz.cuni.amis.pogamut.base.communication.worldview.object.WorldObjectId objectId, Collection<cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> properties)
           
 
Method Summary
 VehicleSharedImpl clone()
           
 Integer getArmor()
          How much the vehicle has left.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getDriver()
          Unique Id of the driver - if any.
 Integer getHealth()
          How much health the vehicle has left.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
          Unique Id of the vehicle or vehicle part.
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
          An absolute location of the vehicle within the map.
 Map<cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId,cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> getProperties()
           
 cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty getProperty(cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId id)
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
          Which direction the vehicle is facing in absolute terms.
 Integer getTeam()
          What team the vehicle is on.
 cz.cuni.amis.pogamut.base3d.worldview.object.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.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.VehicleShared
getCompositeClass, getSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyMap

protected HashMap<cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId,cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> propertyMap

Id

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
Unique Id of the vehicle or vehicle part.


myRotation

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.RotationProperty myRotation
Which direction the vehicle is facing in absolute terms.


myLocation

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.LocationProperty myLocation
An absolute location of the vehicle within the map.


myVelocity

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.VelocityProperty myVelocity
Absolute velocity of the vehicle as a vector of movement per one game second.


myTeam

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.IntegerProperty myTeam
What team the vehicle is on. 255 is no team. 0-3 are red, blue, green, gold in that order.


myHealth

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.IntegerProperty myHealth
How much health the vehicle has left. Ranges from 0 to x, depending on the vehicle type.


myArmor

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.IntegerProperty myArmor
How much the vehicle has left. Note: This may be 0 all the time. Maybe the vehicles are not supporting armor.


myDriver

protected UnrealIdProperty myDriver
Unique Id of the driver - if any.


myTeamLocked

protected cz.cuni.amis.pogamut.multi.communication.worldview.property.BooleanProperty myTeamLocked
If the vehicle is locked just for its current team.

Constructor Detail

VehicleSharedImpl

public VehicleSharedImpl(VehicleSharedImpl source)

VehicleSharedImpl

public VehicleSharedImpl(cz.cuni.amis.pogamut.base.communication.worldview.object.WorldObjectId objectId,
                         Collection<cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> properties)
Method Detail

setSimTime

public void setSimTime(long SimTime)
Description copied from class: VehicleShared
Used by Yylex to slip correct time of the object or programmatically.

Overrides:
setSimTime in class VehicleShared

clone

public VehicleSharedImpl clone()
Specified by:
clone in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject
Specified by:
clone in class VehicleShared

getProperty

public cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty getProperty(cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId id)

getProperties

public Map<cz.cuni.amis.pogamut.multi.communication.worldview.property.PropertyId,cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedProperty> getProperties()

getId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
Unique Id of the vehicle or vehicle part.

Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject
Specified by:
getId in class VehicleShared

getRotation

public cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
Which direction the vehicle is facing in absolute terms.

Specified by:
getRotation in interface cz.cuni.amis.pogamut.base3d.worldview.object.IRotable
Specified by:
getRotation in class VehicleShared

getLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
An absolute location of the vehicle within the map.

Specified by:
getLocation in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocated
Specified by:
getLocation in class VehicleShared

getVelocity

public cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
Absolute velocity of the vehicle as a vector of movement per one game second.

Specified by:
getVelocity in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotive
Specified by:
getVelocity in class VehicleShared

getTeam

public Integer getTeam()
What team the vehicle is on. 255 is no team. 0-3 are red, blue, green, gold in that order.

Specified by:
getTeam in class VehicleShared

getHealth

public Integer getHealth()
How much health the vehicle has left. Ranges from 0 to x, depending on the vehicle type.

Specified by:
getHealth in class VehicleShared

getArmor

public Integer getArmor()
How much the vehicle has left. Note: This may be 0 all the time. Maybe the vehicles are not supporting armor.

Specified by:
getArmor in class VehicleShared

getDriver

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getDriver()
Unique Id of the driver - if any.

Specified by:
getDriver in class VehicleShared

isTeamLocked

public boolean isTeamLocked()
If the vehicle is locked just for its current team.

Specified by:
isTeamLocked in class VehicleShared

toString

public String toString()
Overrides:
toString in class VehicleShared

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class VehicleShared


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