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

Package class diagram package Entity
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Entity
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, IWorldObject, ILocated, IViewable, ICompositeWorldObject, IGBViewable, cz.cuni.amis.utils.listener.Event
Direct Known Subclasses:
EntityCompositeImpl, EntityMessage

public abstract class Entity
extends InfoMessage
implements IWorldEvent, IWorldChangeEvent, ICompositeWorldObject, ILocated, IGBViewable

Abstract definition of the GameBots2004 message ENT.

Complete message documentation: Generic physical entity that may be present in the world. Works as a hook for custom objects, such as new items from EmohawkRPG extension.


Nested Class Summary
static class Entity.EntityUpdate
           
static class Entity.ObjectDisappeared
           
 
Field Summary
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  long SimTime
           
 
Constructor Summary
Entity()
          Parameter-less contructor for the message.
 
Method Summary
 IWorldObjectUpdatedEvent createDisappearEvent()
          Creates an update event that has to update visibility to false.
abstract  String getEntityClass()
          Type (category) of the entity.
abstract  UnrealId getId()
          Unique Id of the item.
abstract  Location getLocation()
          Location of the item.
abstract  Rotation getRotation()
          Rotation of the item.
 long getSimTime()
          Simulation time in MILLI SECONDS !!!
abstract  String getType()
          Type (category) of the entity.
abstract  Velocity getVelocity()
          Velocity of the item.
abstract  boolean isVisible()
          If the item is in the field of view of the bot.
protected  void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toJsonLiteral()
           
 String toString()
           
 
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.multi.communication.worldview.object.ICompositeWorldObject
getLocal, getShared, getStatic
 

Field Detail

PROTOTYPE

public static final String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

SimTime

protected long SimTime
Constructor Detail

Entity

public Entity()
Parameter-less contructor for the message.

Method Detail

getSimTime

public long getSimTime()
Simulation time in MILLI SECONDS !!!

Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldEvent
Specified by:
getSimTime in interface IWorldObject

setSimTime

protected void setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.


getId

public abstract UnrealId getId()
Unique Id of the item. This Id represents some entity in the world.

Specified by:
getId in interface IWorldObject

isVisible

public abstract boolean isVisible()
If the item is in the field of view of the bot.

Specified by:
isVisible in interface IViewable

getLocation

public abstract Location getLocation()
Location of the item.

Specified by:
getLocation in interface ILocated

getRotation

public abstract Rotation getRotation()
Rotation of the item.


getVelocity

public abstract Velocity getVelocity()
Velocity of the item.


getType

public abstract String getType()
Type (category) of the entity.


getEntityClass

public abstract String getEntityClass()
Type (category) of the entity.


createDisappearEvent

public IWorldObjectUpdatedEvent createDisappearEvent()
Description copied from interface: IGBViewable
Creates an update event that has to update visibility to false.

Specified by:
createDisappearEvent in interface IGBViewable
Returns:

toString

public String toString()
Overrides:
toString in class InfoMessage

toHtmlString

public String toHtmlString()

toJsonLiteral

public String toJsonLiteral()
Overrides:
toJsonLiteral in class InfoMessage


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