cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class NavPointMessage.NavPointSharedMessage

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.NavPointMessage.NavPointSharedMessage
All Implemented Interfaces:
IWorldObject, ILocated, ILocomotive, ISharedWorldObject, java.lang.Cloneable
Enclosing class:
NavPointMessage

public class NavPointMessage.NavPointSharedMessage
extends NavPointShared

Implementation of the shared part of the GameBots2004 message NAV, used to facade NAVMessage.

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..).


Field Summary
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
NavPointMessage.NavPointSharedMessage()
           
 
Method Summary
 NavPointMessage.NavPointSharedMessage 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.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointShared
getCompositeClass, getSimTime, setSimTime
 
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

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

NavPointMessage.NavPointSharedMessage

public NavPointMessage.NavPointSharedMessage()
Method Detail

clone

public NavPointMessage.NavPointSharedMessage 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