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

Package class diagram package 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, Cloneable

public class NavPointSharedImpl
extends NavPointShared

Implementation of the shared part of the GameBots2004 message NAV.

Complete message documentation: Synchronous message - however only NavPoints marking item pickup locations are exported synchronously. Other NavPoints are not exported synchronously at all, even if the bot can actually see them (but note that ALL NavPoints are exported in the handshake between bot and the server). Exporting NavPoints synchronously took a lot of UT server resources with limited information gain (in Pogamut there is now available visibility matrix holding static information which points can be seen from other points). NavPoint carries information about UT navigation point - location, paths and some additional information are stored there (if it is an ambush point, or sniper point, etc.).


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  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, 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.
 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.
 String toHtmlString()
           
 String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPointShared
getCompositeClass, getSimTime
 
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
toJsonLiteral
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

propertyMap

protected 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,
                          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 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

getLocation

public Location getLocation()
Location of navigation point.

Specified by:
getLocation in interface ILocated
Specified by:
getLocation in class NavPointShared

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

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 String toString()
Overrides:
toString in class NavPointShared

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class NavPointShared


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