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

Package class diagram package PlayerSharedImpl
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerShared
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerSharedImpl
All Implemented Interfaces:
IWorldObject, ISharedWorldObject, Cloneable

public class PlayerSharedImpl
extends PlayerShared

Implementation of the shared part of the GameBots2004 message PLR.

Complete message documentation: Synchronous message. Contains information about other players in the game, like their current velocity, position, weapon and reachability. Only reports those players that are visible. (within field of view and not occluded).


Nested Class Summary
static class PlayerSharedImpl.PlayerSharedUpdate
           
 
Field Summary
protected  UnrealId Id
          Unique Id of the player.
protected  StringProperty myAction
          Atomic action this bot is doing (BDI).
protected  StringProperty myAnim
          For UE2.
protected  StringProperty myBubble
          For UE2.
protected  BooleanProperty myCrouched
          True if the bot is crouched.
protected  StringProperty myEmotCenter
          For UE2.
protected  StringProperty myEmotLeft
          For UE2.
protected  StringProperty myEmotRight
          For UE2.
protected  IntProperty myFiring
          0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).
protected  LocationProperty myLocation
          An absolute location of the player within the map.
protected  StringProperty myName
          Human readable name of the player.
protected  RotationProperty myRotation
          Which direction the player is facing in absolute terms.
protected  IntProperty myTeam
          What team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order.
protected  VelocityProperty myVelocity
          Absolute velocity of the player as a vector of movement per one game second.
protected  StringProperty myWeapon
          Class of the weapon the player is holding.
protected  HashMap<PropertyId,ISharedProperty> propertyMap
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerShared
ActionPropertyToken, AnimPropertyToken, BubblePropertyToken, CrouchedPropertyToken, EmotCenterPropertyToken, EmotLeftPropertyToken, EmotRightPropertyToken, FiringPropertyToken, LocationPropertyToken, NamePropertyToken, RotationPropertyToken, SharedPropertyTokens, SimTime, TeamPropertyToken, VelocityPropertyToken, WeaponPropertyToken
 
Constructor Summary
PlayerSharedImpl(PlayerSharedImpl source)
           
PlayerSharedImpl(WorldObjectId objectId, Collection<ISharedProperty> properties)
           
 
Method Summary
 PlayerSharedImpl clone()
           
 String getAction()
          Atomic action this bot is doing (BDI).
 String getAnim()
          For UE2.
 String getBubble()
          For UE2.
 String getEmotCenter()
          For UE2.
 String getEmotLeft()
          For UE2.
 String getEmotRight()
          For UE2.
 int getFiring()
          0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).
 UnrealId getId()
          Unique Id of the player.
 Location getLocation()
          An absolute location of the player within the map.
 String getName()
          Human readable name of the player.
 Map<PropertyId,ISharedProperty> getProperties()
           
 ISharedProperty getProperty(PropertyId id)
           
 Rotation getRotation()
          Which direction the player is facing in absolute terms.
 int getTeam()
          What team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order.
 Velocity getVelocity()
          Absolute velocity of the player as a vector of movement per one game second.
 String getWeapon()
          Class of the weapon the player is holding.
 boolean isCrouched()
          True if the bot is crouched.
 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.PlayerShared
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
Unique Id of the player.


myName

protected StringProperty myName
Human readable name of the player.


myAction

protected StringProperty myAction
Atomic action this bot is doing (BDI).


myRotation

protected RotationProperty myRotation
Which direction the player is facing in absolute terms.


myLocation

protected LocationProperty myLocation
An absolute location of the player within the map.


myVelocity

protected VelocityProperty myVelocity
Absolute velocity of the player as a vector of movement per one game second.


myTeam

protected IntProperty myTeam
What team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order.


myWeapon

protected StringProperty myWeapon
Class of the weapon the player is holding. Weapon strings to look for include: "AssaultRifle", "ShieldGun", "FlakCannon", "BioRifle", "ShockRifle", "LinkGun", "SniperRifle", "RocketLauncher", "Minigun", "LightingGun", "Translocator". TODO: Look if this is all.


myCrouched

protected BooleanProperty myCrouched
True if the bot is crouched.


myFiring

protected IntProperty myFiring
0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).


myEmotLeft

protected StringProperty myEmotLeft
For UE2. Holds left emoticon of the bot, "None" means none set.


myEmotCenter

protected StringProperty myEmotCenter
For UE2. Holds center emoticon of the bot, "None" means none set.


myEmotRight

protected StringProperty myEmotRight
For UE2. Holds right emoticon of the bot, "None" means none set.


myBubble

protected StringProperty myBubble
For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.


myAnim

protected StringProperty myAnim
For UE2. Current played animation of the bot.

Constructor Detail

PlayerSharedImpl

public PlayerSharedImpl(PlayerSharedImpl source)

PlayerSharedImpl

public PlayerSharedImpl(WorldObjectId objectId,
                        Collection<ISharedProperty> properties)
Method Detail

setSimTime

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

Overrides:
setSimTime in class PlayerShared

clone

public PlayerSharedImpl clone()
Specified by:
clone in interface ISharedWorldObject
Specified by:
clone in class PlayerShared

getProperty

public ISharedProperty getProperty(PropertyId id)

getProperties

public Map<PropertyId,ISharedProperty> getProperties()

getId

public UnrealId getId()
Unique Id of the player.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class PlayerShared

getName

public String getName()
Human readable name of the player.

Specified by:
getName in class PlayerShared

getAction

public String getAction()
Atomic action this bot is doing (BDI).

Specified by:
getAction in class PlayerShared

getRotation

public Rotation getRotation()
Which direction the player is facing in absolute terms.

Specified by:
getRotation in class PlayerShared

getLocation

public Location getLocation()
An absolute location of the player within the map.

Specified by:
getLocation in class PlayerShared

getVelocity

public Velocity getVelocity()
Absolute velocity of the player as a vector of movement per one game second.

Specified by:
getVelocity in class PlayerShared

getTeam

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

Specified by:
getTeam in class PlayerShared

getWeapon

public String getWeapon()
Class of the weapon the player is holding. Weapon strings to look for include: "AssaultRifle", "ShieldGun", "FlakCannon", "BioRifle", "ShockRifle", "LinkGun", "SniperRifle", "RocketLauncher", "Minigun", "LightingGun", "Translocator". TODO: Look if this is all.

Specified by:
getWeapon in class PlayerShared

isCrouched

public boolean isCrouched()
True if the bot is crouched.

Specified by:
isCrouched in class PlayerShared

getFiring

public int getFiring()
0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing).

Specified by:
getFiring in class PlayerShared

getEmotLeft

public String getEmotLeft()
For UE2. Holds left emoticon of the bot, "None" means none set.

Specified by:
getEmotLeft in class PlayerShared

getEmotCenter

public String getEmotCenter()
For UE2. Holds center emoticon of the bot, "None" means none set.

Specified by:
getEmotCenter in class PlayerShared

getEmotRight

public String getEmotRight()
For UE2. Holds right emoticon of the bot, "None" means none set.

Specified by:
getEmotRight in class PlayerShared

getBubble

public String getBubble()
For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.

Specified by:
getBubble in class PlayerShared

getAnim

public String getAnim()
For UE2. Current played animation of the bot.

Specified by:
getAnim in class PlayerShared

toString

public String toString()
Overrides:
toString in class PlayerShared

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class PlayerShared


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