|
||||||||||
| 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.udk.communication.messages.GBObjectUpdate
cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.Player
public class Player
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). Corresponding GameBots message is PLR.
| Nested Class Summary | |
|---|---|
static class |
Player.ObjectDisappeared
Used to drop Visible flag from the object. |
| Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent |
|---|
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent.DestroyWorldObject |
| Field Summary | |
|---|---|
protected 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 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
Id
Unique Id of the player. |
protected String |
Jmx
Exported just for control server. |
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location |
Location
An absolute location of the player within the map. |
protected String |
Name
Human readable name of the player. |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected boolean |
Reachable
True if the bot can run to this other player directly, false otherwise. |
protected cz.cuni.amis.pogamut.base3d.worldview.object.Rotation |
Rotation
Which direction the player is facing in absolute terms. |
protected int |
Team
What team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order. |
protected double |
Time
|
protected cz.cuni.amis.pogamut.base3d.worldview.object.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 String |
Weapon
Class of the weapon the player is holding. |
| Constructor Summary | |
|---|---|
Player()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package). |
|
Player(Player original)
Cloning constructor. |
|
Player(Player Original,
boolean Visible)
Used to create event that drops the Visible flag of the item. |
|
Player(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id,
String Jmx,
String Name,
String Action,
boolean Visible,
cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation,
cz.cuni.amis.pogamut.base3d.worldview.object.Location Location,
cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity,
int Team,
String Weapon,
boolean Reachable,
int Firing)
Creates new instance of command Player. |
|
| Method Summary | |
|---|---|
IGBWorldObjectDisappeared |
createDisappearEvent()
Creates an update event that has to update visibility to false. |
boolean |
equals(Object obj)
|
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). |
cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId |
getId()
Unique Id of the player. |
String |
getJmx()
Exported just for control server. |
double |
getLastSeenTime()
|
cz.cuni.amis.pogamut.multi.communication.worldview.object.ILocalWorldObject |
getLocal()
|
cz.cuni.amis.pogamut.base3d.worldview.object.Location |
getLocation()
An absolute location of the player within the map. |
String |
getName()
Human readable name of the player. |
cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject |
getObject()
Returns original object (if method update() has already been called, for bot-programmer that is always true as the original object is updated and then the event is propagated). |
cz.cuni.amis.pogamut.base3d.worldview.object.Rotation |
getRotation()
Which direction the player is facing in absolute terms. |
cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject |
getShared()
|
long |
getSimTime()
|
cz.cuni.amis.pogamut.multi.communication.worldview.object.IStaticWorldObject |
getStatic()
|
int |
getTeam()
What team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order. |
protected double |
getTime()
|
cz.cuni.amis.pogamut.base3d.worldview.object.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. |
int |
hashCode()
|
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 |
setTime(double time)
|
String |
toHtmlString()
|
String |
toString()
|
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult |
update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject obj)
|
| Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage |
|---|
toJsonLiteral |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROTOTYPE
protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
protected String Jmx
protected String Name
protected String Action
protected boolean Visible
protected cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation
protected cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
protected cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity
protected int Team
protected String Weapon
protected boolean Reachable
protected int Firing
protected double Time
| Constructor Detail |
|---|
public Player(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id,
String Jmx,
String Name,
String Action,
boolean Visible,
cz.cuni.amis.pogamut.base3d.worldview.object.Rotation Rotation,
cz.cuni.amis.pogamut.base3d.worldview.object.Location Location,
cz.cuni.amis.pogamut.base3d.worldview.object.Velocity Velocity,
int Team,
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: "LinkGun", "RocketLauncher", "RocketLauncher_Content".
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 Player(Player original)
public Player()
public Player(Player Original,
boolean Visible)
| Method Detail |
|---|
public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
getId in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEventgetId in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectgetId in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic String getJmx()
public String getName()
getName in interface IPersongetName in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic String getAction()
getAction in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic boolean isVisible()
isVisible in interface cz.cuni.amis.pogamut.base3d.worldview.object.IViewableisVisible in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation()
getRotation in interface cz.cuni.amis.pogamut.base3d.worldview.object.IRotablegetRotation in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
getLocation in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocatedgetLocation in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity()
getVelocity in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocomotivegetVelocity in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic int getTeam()
getTeam in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic String getWeapon()
getWeapon in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic boolean isReachable()
public int getFiring()
getFiring in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerprotected double getTime()
protected void setTime(double time)
public double getLastSeenTime()
public cz.cuni.amis.pogamut.multi.communication.worldview.object.ILocalWorldObject getLocal()
getLocal in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObjectpublic cz.cuni.amis.pogamut.multi.communication.worldview.object.ISharedWorldObject getShared()
getShared in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObjectpublic cz.cuni.amis.pogamut.multi.communication.worldview.object.IStaticWorldObject getStatic()
getStatic in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObjectpublic long getSimTime()
getSimTime in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEventgetSimTime in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectgetSimTime in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayerpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic IGBWorldObjectDisappeared createDisappearEvent()
IGBViewable
createDisappearEvent in interface IGBViewablepublic cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject obj)
update in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEventpublic cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject getObject()
public String toString()
toString in class cz.cuni.amis.pogamut.base.communication.messages.InfoMessagepublic String toHtmlString()
toHtmlString in interface cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||