|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcz.cuni.amis.pogamut.base.communication.messages.InfoMessage
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player
cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.PlayerMessage
public class PlayerMessage

Implementation of the GameBots2004 message PLR contains also its Local/Shared/Static subpart class definitions..
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 | |
|---|---|
class |
PlayerMessage.PlayerLocalMessage
Implementation of the local part of the GameBots2004 message PLR, used to facade PLRMessage. |
class |
PlayerMessage.PlayerSharedMessage
Implementation of the shared part of the GameBots2004 message PLR, used to facade PLRMessage. |
class |
PlayerMessage.PlayerStaticMessage
Implementation of the static part of the GameBots2004 message PLR, used to facade PLRMessage. |
| Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player |
|---|
Player.ObjectDisappeared, Player.PlayerUpdate |
| Field Summary | |
|---|---|
protected java.lang.String |
Action
Atomic action this bot is doing (BDI). |
protected int |
Firing
0 means is not firing, 1 - firing in primary mode, 2 - firing in secondary mode (alt firing). |
protected UnrealId |
Id
Unique Id of the player. |
protected java.lang.String |
Jmx
Exported just for control server. |
protected Location |
Location
An absolute location of the player within the map. |
protected java.lang.String |
Name
Human readable name of the player. |
protected boolean |
Reachable
True if the bot can run to this other player directly, false otherwise. |
protected Rotation |
Rotation
Which direction the player is facing in absolute terms. |
protected int |
Team
What team the player is on. |
protected ITeamId |
TeamId
|
protected Velocity |
Velocity
Absolute velocity of the player as a vector of movement per one game second. |
protected boolean |
Visible
If the player is in the field of view of the bot. |
protected java.lang.String |
Weapon
Class of the weapon the player is holding. |
| Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player |
|---|
PROTOTYPE, SimTime |
| Constructor Summary | |
|---|---|
PlayerMessage()
Parameter-less contructor for the message. |
|
PlayerMessage(PlayerMessage original)
Cloning constructor from the full message. |
|
PlayerMessage(UnrealId Id,
java.lang.String Jmx,
java.lang.String Name,
java.lang.String Action,
boolean Visible,
Rotation Rotation,
Location Location,
Velocity Velocity,
int Team,
java.lang.String Weapon,
boolean Reachable,
int Firing)
Creates new instance of the message Player. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAction()
Atomic action this bot is doing (BDI). |
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. |
java.lang.String |
getJmx()
Exported just for control server. |
PlayerLocal |
getLocal()
|
Location |
getLocation()
An absolute location of the player within the map. |
java.lang.String |
getName()
Human readable name of the player. |
Rotation |
getRotation()
Which direction the player is facing in absolute terms. |
PlayerShared |
getShared()
|
PlayerStatic |
getStatic()
|
int |
getTeam()
What team the player is on. |
ITeamId |
getTeamId()
|
Velocity |
getVelocity()
Absolute velocity of the player as a vector of movement per one game second. |
java.lang.String |
getWeapon()
Class of the weapon the player is holding. |
boolean |
isReachable()
True if the bot can run to this other player directly, false otherwise. |
boolean |
isVisible()
If the player is in the field of view of the bot. |
protected void |
setTeamId(ITeamId TeamId)
Used by Yylex to slip corretn TeamId. |
java.lang.String |
toHtmlString()
|
java.lang.String |
toString()
|
IWorldObjectUpdateResult<IWorldObject> |
update(IWorldObject object)
|
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player |
|---|
createDisappearEvent, getSimTime, setSimTime |
| 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.base.communication.translator.event.IWorldChangeEvent |
|---|
getSimTime |
| Field Detail |
|---|
protected ITeamId TeamId
protected UnrealId Id
protected java.lang.String Jmx
protected java.lang.String Name
protected java.lang.String Action
protected boolean Visible
protected Rotation Rotation
protected Location Location
protected Velocity Velocity
protected int Team
protected java.lang.String Weapon
protected boolean Reachable
protected int Firing
| Constructor Detail |
|---|
public PlayerMessage()
public PlayerMessage(UnrealId Id,
java.lang.String Jmx,
java.lang.String Name,
java.lang.String Action,
boolean Visible,
Rotation Rotation,
Location Location,
Velocity Velocity,
int Team,
java.lang.String Weapon,
boolean Reachable,
int Firing)
Id - Unique Id of the player.Jmx - Exported just for control server. Holds jmx address we need to connect to
when we want to debug our bot.Name - Human readable name of the player.Action - Atomic action this bot is doing (BDI).Visible - If the player is in the field of view of the bot.Rotation - Which direction the player is facing in absolute terms.Location - An absolute location of the player within the map.Velocity - Absolute velocity of the player as a vector of movement per one
game second.Team - What team the player is on. 255 is no team. 0-3 are red,
blue, green, gold in that order.Weapon - 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.Reachable - True if the bot can run to this other player directly, false
otherwise. Possible reasons for false: pit or obstacle
between the two characters.Firing - 0 means is not firing, 1 - firing in primary mode, 2 -
firing in secondary mode (alt firing).public PlayerMessage(PlayerMessage original)
original - | Method Detail |
|---|
protected void setTeamId(ITeamId TeamId)
public ITeamId getTeamId()
public UnrealId getId()
Player
getId in interface IWorldObjectUpdatedEventgetId in interface IWorldObjectgetId in interface IPlayergetId in class Playerpublic java.lang.String getJmx()
Player
getJmx in class Playerpublic java.lang.String getName()
Player
getName in interface IPlayergetName in interface IPersongetName in class Playerpublic java.lang.String getAction()
Player
getAction in interface IPlayergetAction in class Playerpublic boolean isVisible()
Player
isVisible in interface IViewableisVisible in interface IPlayerisVisible in class Playerpublic Rotation getRotation()
Player
getRotation in interface IRotablegetRotation in interface IPlayergetRotation in class Playerpublic Location getLocation()
Player
getLocation in interface ILocatedgetLocation in interface IPlayergetLocation in class Playerpublic Velocity getVelocity()
Player
getVelocity in interface ILocomotivegetVelocity in interface IPlayergetVelocity in class Playerpublic int getTeam()
Player
getTeam in interface IPlayergetTeam in class Playerpublic java.lang.String getWeapon()
Player
getWeapon in interface IPlayergetWeapon in class Playerpublic boolean isReachable()
Player
isReachable in interface IPlayerisReachable in class Playerpublic int getFiring()
Player
getFiring in interface IPlayergetFiring in class Playerpublic PlayerLocal getLocal()
getLocal in interface ICompositeWorldObjectpublic PlayerShared getShared()
getShared in interface ICompositeWorldObjectpublic PlayerStatic getStatic()
getStatic in interface ICompositeWorldObjectpublic IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
update in interface IWorldObjectUpdatedEventpublic java.lang.String toString()
toString in class Playerpublic java.lang.String toHtmlString()
toHtmlString in interface IPlayertoHtmlString in class Player
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||