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

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointShared
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointSharedImpl
All Implemented Interfaces:
IWorldObject, ILocated, ILocomotive, ISharedWorldObject, java.lang.Cloneable

public class NavPointSharedImpl
extends NavPointShared

Implementation of the shared part of the GameBots2004 message NAV.

Complete message documentation: Synchronous message. NavPoint carries information about UT navigation point - location, reachability... Also some item can be respawned at this point. Or some additional information can be stored here (if it is an ambush point, or sniper point..).


Nested Class Summary
static class NavPointSharedImpl.NavPointSharedUpdate
           
 
Field Summary
protected  UnrealId Id
          A unique Id of this navigation point assigned by the game.
protected  BooleanProperty myDoorOpened
          True if this NavPoint is a Door and door is opened.
protected  BooleanProperty myItemSpawned
          True if the item is spawned at the point.
protected  LocationProperty myLocation
          Location of navigation point.
protected  VelocityProperty myVelocity
          Velocity of the navigation point (if the navigation point is currently moving).
protected  java.util.HashMap<PropertyId,ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointShared
DoorOpenedPropertyToken, ItemSpawnedPropertyToken, LocationPropertyToken, SharedPropertyTokens, SimTime, VelocityPropertyToken
 
Constructor Summary
NavPointSharedImpl(NavPointSharedImpl source)
           
NavPointSharedImpl(WorldObjectId objectId, java.util.Collection<ISharedProperty> properties)
           
 
Method Summary
 NavPointSharedImpl clone()
           
 UnrealId getId()
          A unique Id of this navigation point assigned by the game.
 Location getLocation()
          Location of navigation point.
 java.util.Map<PropertyId,ISharedProperty> getProperties()
           
 ISharedProperty getProperty(PropertyId id)
           
 Velocity getVelocity()
          Velocity of the navigation point (if the navigation point is currently moving).
 boolean isDoorOpened()
          True if this NavPoint is a Door and door is opened.
 boolean isItemSpawned()
          True if the item is spawned at the point.
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointShared
getCompositeClass, getSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyMap

protected java.util.HashMap<PropertyId,ISharedProperty> propertyMap

Id

protected UnrealId Id
A unique Id of this navigation point assigned by the game.


myLocation

protected LocationProperty myLocation
Location of navigation point.


myVelocity

protected VelocityProperty myVelocity
Velocity of the navigation point (if the navigation point is currently moving). Not sent at the moment.


myItemSpawned

protected BooleanProperty myItemSpawned
True if the item is spawned at the point. Not sent if point is not an inventory spot.


myDoorOpened

protected BooleanProperty myDoorOpened
True if this NavPoint is a Door and door is opened. Not sent if point is not a door.

Constructor Detail

NavPointSharedImpl

public NavPointSharedImpl(NavPointSharedImpl source)

NavPointSharedImpl

public NavPointSharedImpl(WorldObjectId objectId,
                          java.util.Collection<ISharedProperty> properties)
Method Detail

setSimTime

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

Overrides:
setSimTime in class NavPointShared

clone

public NavPointSharedImpl clone()
Specified by:
clone in interface ISharedWorldObject
Specified by:
clone in class NavPointShared

getProperty

public ISharedProperty getProperty(PropertyId id)

getProperties

public java.util.Map<PropertyId,ISharedProperty> getProperties()

getId

public UnrealId getId()
A unique Id of this navigation point assigned by the game.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class NavPointShared
Returns:

getLocation

public Location getLocation()
Location of navigation point.

Specified by:
getLocation in interface ILocated
Specified by:
getLocation in class NavPointShared
Returns:
Current location of the object, represented as a point within the world's coordinates.

getVelocity

public Velocity getVelocity()
Velocity of the navigation point (if the navigation point is currently moving). Not sent at the moment.

Specified by:
getVelocity in interface ILocomotive
Specified by:
getVelocity in class NavPointShared
Returns:
Current direction in which the object is moving and absolute velocity of the object within the world. The direction is represented as a vector within the world's coordinates. The size of velocity is represented by length of that vector.

isItemSpawned

public boolean isItemSpawned()
True if the item is spawned at the point. Not sent if point is not an inventory spot.

Specified by:
isItemSpawned in class NavPointShared

isDoorOpened

public boolean isDoorOpened()
True if this NavPoint is a Door and door is opened. Not sent if point is not a door.

Specified by:
isDoorOpened in class NavPointShared

toString

public java.lang.String toString()
Overrides:
toString in class NavPointShared

toHtmlString

public java.lang.String toHtmlString()
Overrides:
toHtmlString in class NavPointShared