|
|||||||||
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.Self
public class Self
Information about your bot's state.
FIXME: is reachable present? In documentation is not
can be delta message
Field Summary | |
---|---|
double |
adrenaline
Adrenaline - how much adrenaline the bot has. |
int |
altFiring
|
int |
armor
Armor - how much armor the bot is wearing. |
int |
currentAltAmmo
Alternative Ammo - how many alternative ammo for the current weapon the bot has. |
int |
currentAmmo
CurrentAmmo - How much ammo the bot has left for current weapon |
int |
health
Health - how much health the bot has left. |
Triple |
location
Location - an absolute location |
java.lang.String |
name
Name - players human readable name |
boolean |
reachable
|
Triple |
rotation
Rotation - which direction the player is facing in absolute terms |
boolean |
shooting
Shooting - wether the bot is shooting or not TODO: FIXME: IS NOT IMPLEMENTED YET BY GAMEBOTS (in this class diff(), update() are OK) |
int |
team
Team - what team the player is on. 255 is no team. 0-3 are red, blue, green, gold in that order |
Triple |
velocity
Velocity - absolute velocity in UT units |
java.lang.String |
weapon
Weapon - weapon the player is holding. |
Fields inherited from class cz.cuni.pogamut.MessageObjects.MessageObject |
---|
ID, type, types, UnrealID, visible |
Constructor Summary | |
---|---|
Self()
|
|
Self(int ID,
java.lang.String UnrealID,
java.lang.String name,
Triple location,
Triple rotation,
Triple velocity,
int team,
java.lang.String weapon,
boolean reachable,
int health,
int currentAmmo,
int armor,
boolean visible,
boolean shooting,
double adrenaline,
int currentAltAmmo)
|
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. |
double |
getAdrenaline()
|
int |
getArmor()
|
int |
getCurrentAlternativeAmmo()
|
int |
getCurrentAmmo()
|
int |
getHealth()
|
Triple |
getSelfLocation()
|
java.lang.String |
getSelfName()
|
boolean |
getSelfReachability()
|
Triple |
getSelfRotation()
|
int |
getSelfTeam()
|
Triple |
getSelfVelocity()
|
java.lang.String |
getSelfWeapon()
|
boolean |
getShooting()
|
boolean |
hasID()
|
java.lang.String |
toString()
|
void |
update(MessageObject newMsgObj)
Writes non-null information from newMsgObj to current one. |
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 java.lang.String name
public Triple location
public Triple rotation
public Triple velocity
public int team
public java.lang.String weapon
public boolean reachable
public int health
public int currentAmmo
public int armor
public int altFiring
public double adrenaline
public int currentAltAmmo
public boolean shooting
Constructor Detail |
---|
public Self(int ID, java.lang.String UnrealID, java.lang.String name, Triple location, Triple rotation, Triple velocity, int team, java.lang.String weapon, boolean reachable, int health, int currentAmmo, int armor, boolean visible, boolean shooting, double adrenaline, int currentAltAmmo)
public Self()
Method Detail |
---|
public boolean hasID()
hasID
in class MessageObject
public java.lang.Object clone()
MessageObject
clone
in class MessageObject
public Triple getSelfLocation()
public Triple getSelfRotation()
public Triple getSelfVelocity()
public int getSelfTeam()
public java.lang.String getSelfWeapon()
public boolean getSelfReachability()
public int getArmor()
public int getCurrentAmmo()
public int getHealth()
public java.lang.String getSelfName()
public boolean getShooting()
public int getCurrentAlternativeAmmo()
public double getAdrenaline()
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 java.lang.String toString()
toString
in class MessageObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |