|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.pogamut.MessageObjects.MessageObject
cz.cuni.pogamut.MessageObjects.Player
public class Player
Contains information about other players in the game, like their current
velocity, position, weapon and rechablity
Another character (bot or human) in the game. Only reports those players that are visible. (within field of view and not occluded).
Can be delta message
Field Summary | |
---|---|
boolean |
autoTrace
Autotrace feature enabled? |
boolean |
drawTraceLines
draw trace line in UT GUI? |
boolean |
invulnerable
Is bot invulnerable? |
Triple |
location
Location - an absolute location for the player |
boolean |
manualSpawn
is it necessary to spawn bot manually? |
java.lang.String |
name
Name of the player |
boolean |
reachable
Reachable - true if the bot can run to this other player directly, false otherwise. |
Triple |
rotation
Rotation - which direction the player is facing in absolute terms |
int |
shooting
Shooting - whether player is shooting |
boolean |
showDebug
show debug for him? |
boolean |
showFocalPoint
show where the bot look at |
boolean |
synchronousOff
Disable all synchronous messages? |
int |
team
Team - what team the player is on. |
static int |
TEAM_BLUE
|
static int |
TEAM_RED
|
Triple |
velocity
Velocity - absolute velocity in UT units |
double |
visionTime
vision time of bot |
java.lang.String |
weapon
Weapon - what class of weapon the character is holding. |
Fields inherited from class cz.cuni.pogamut.MessageObjects.MessageObject |
---|
ID, type, types, UnrealID, visible |
Constructor Summary | |
---|---|
Player()
|
|
Player(int ID,
java.lang.String UnrealID,
Triple location,
Triple rotation,
Triple velocity,
int team,
java.lang.String weapon,
boolean reachable,
boolean visible,
java.lang.String name,
boolean autoTrace,
boolean invulnerable,
boolean manualSpawn,
double visionTime,
boolean showDebug,
boolean showFocalPoint,
boolean drawTraceLines,
boolean synchronousOff)
|
|
Player(Player original)
|
|
Player(PlayerJoinsGame fake)
This is used as a fake constructor for IDE, where we need to know only some parameters from here... |
|
Player(PlayerLeft fake)
This is used as a fake constructor for IDE, where we need to know only some parameters from here... |
|
Player(java.lang.String UnrealID,
int ID)
Another fake constructor for |
Method Summary | |
---|---|
java.lang.Object |
clone()
clone object - for hard copying |
boolean |
diff(MessageObject old)
change this object that all properties that are same as old will be set to null or 0 or similar. |
Triple |
getLocation()
|
boolean |
getPlayerReachability()
|
Triple |
getPlayerRotation()
|
int |
getPlayerTeam()
|
Triple |
getPlayerVelocity()
|
java.lang.String |
getPlayerWeapon()
|
boolean |
hasID()
|
java.lang.String |
toString()
|
void |
update(MessageObject newMsgObj)
Writes non-null information from newMsgObj to current one. |
void |
updateConfigChange(ConfigChange change)
|
Methods inherited from class cz.cuni.pogamut.MessageObjects.MessageObject |
---|
equals, getID, getType, getUnrealID, getVisibility, isVisible, setID, setType, setUnrealID, setVisible |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TEAM_RED
public static final int TEAM_BLUE
public Triple location
public Triple rotation
public Triple velocity
public int team
public java.lang.String weapon
public boolean reachable
public int shooting
public java.lang.String name
public boolean autoTrace
public boolean invulnerable
public boolean manualSpawn
public double visionTime
public boolean showDebug
public boolean showFocalPoint
public boolean drawTraceLines
public boolean synchronousOff
Constructor Detail |
---|
public Player(PlayerJoinsGame fake)
fake
- public Player(PlayerLeft fake)
fake
- public Player(java.lang.String UnrealID, int ID)
UnrealID
- ID
- public Player(int ID, java.lang.String UnrealID, Triple location, Triple rotation, Triple velocity, int team, java.lang.String weapon, boolean reachable, boolean visible, java.lang.String name, boolean autoTrace, boolean invulnerable, boolean manualSpawn, double visionTime, boolean showDebug, boolean showFocalPoint, boolean drawTraceLines, boolean synchronousOff)
public Player()
public Player(Player original)
Method Detail |
---|
public boolean hasID()
hasID
in class MessageObject
public java.lang.Object clone()
MessageObject
clone
in class MessageObject
public Triple getLocation()
getLocation
in interface Located
public Triple getPlayerRotation()
public Triple getPlayerVelocity()
public int getPlayerTeam()
public java.lang.String getPlayerWeapon()
public boolean getPlayerReachability()
public boolean diff(MessageObject old)
MessageObject
diff
in class MessageObject
old
- Object we use as reference for change.
public void update(MessageObject newMsgObj)
MessageObject
update
in class MessageObject
public void updateConfigChange(ConfigChange change)
public java.lang.String toString()
toString
in class MessageObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |