|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.communication.messages.InfoMessage cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocal cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocalImpl
public class SelfLocalImpl
Implementation of the local part of the GameBots2004 message SLF.
Complete message documentation: Synchronous message. Information about your bot's state.
Nested Class Summary | |
---|---|
static class |
SelfLocalImpl.SelfLocalUpdate
|
Field Summary | |
---|---|
protected String |
Action
Name of the current BDI action. |
protected int |
Adrenaline
How much adrenaline the bot has. |
protected boolean |
AltFiring
If we are firing in secondary firing mode. |
protected String |
Anim
For UE2. |
protected int |
Armor
Combined size of high armor and low armor (or small armor). |
protected UnrealId |
BotId
Unique Id of this bot. |
protected String |
Bubble
For UE2. |
protected String |
Combo
Name of the current combo (None if no combo active). |
protected boolean |
Crouched
If we are currently crouched. |
protected String |
EmotCenter
For UE2. |
protected String |
EmotLeft
For UE2. |
protected String |
EmotRight
For UE2. |
protected Location |
FloorLocation
Holds current floor location under the bot. |
protected Location |
FloorNormal
Holds current floor normal under the bot. |
protected int |
Health
How much health the bot has left. |
protected UnrealId |
Id
Unique Id of this self message instance. |
protected Location |
Location
An absolute location of the bot. |
protected String |
Name
Human readable bot name. |
protected int |
PrimaryAmmo
How much ammo the bot has left for current weapon primary mode. |
protected Rotation |
Rotation
Which direction the bot is facing in absolute terms. |
protected int |
SecondaryAmmo
How much ammo the bot has left for current weapon secondary mode. |
protected boolean |
Shooting
If the bot is shooting or not. |
protected int |
SmallArmor
Also refered to as a "low armor". |
protected int |
Team
What team the bot is on. 255 is no team. 0-3 are red, blue, green, gold in that order. |
protected double |
UDamageTime
Time when the UDamage effect expires. |
protected boolean |
Vehicle
If we are vehicle just these attr. are sent in SLF: "Id","Vehicle""Rotation", "Location","Velocity ","Name ","Team" ,"Health" "Armor","Adrenaline", "FloorLocation", "FloorNormal". |
protected Velocity |
Velocity
Absolute velocity of the bot as a vector of movement per one game second. |
protected boolean |
Walking
If we are currently in walking mode. |
protected String |
Weapon
Id of the weapon we are holding. |
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.SelfLocal |
---|
SimTime |
Constructor Summary | |
---|---|
SelfLocalImpl()
Parameter-less contructor for the message. |
|
SelfLocalImpl(Self original)
Cloning constructor from the full message. |
|
SelfLocalImpl(SelfLocal original)
Cloning constructor from the message part. |
|
SelfLocalImpl(SelfLocalImpl original)
Cloning constructor from the full message. |
|
SelfLocalImpl(UnrealId Id,
UnrealId BotId,
String Name,
boolean Vehicle,
Location Location,
Velocity Velocity,
Rotation Rotation,
int Team,
String Weapon,
boolean Shooting,
int Health,
int PrimaryAmmo,
int SecondaryAmmo,
int Adrenaline,
int Armor,
int SmallArmor,
boolean AltFiring,
boolean Crouched,
boolean Walking,
Location FloorLocation,
Location FloorNormal,
String Combo,
double UDamageTime,
String Action,
String EmotLeft,
String EmotCenter,
String EmotRight,
String Bubble,
String Anim)
Creates new instance of the message Self. |
Method Summary | |
---|---|
SelfLocalImpl |
clone()
|
String |
getAction()
Name of the current BDI action. |
int |
getAdrenaline()
How much adrenaline the bot has. |
String |
getAnim()
For UE2. |
int |
getArmor()
Combined size of high armor and low armor (or small armor). |
UnrealId |
getBotId()
Unique Id of this bot. |
String |
getBubble()
For UE2. |
String |
getCombo()
Name of the current combo (None if no combo active). |
String |
getEmotCenter()
For UE2. |
String |
getEmotLeft()
For UE2. |
String |
getEmotRight()
For UE2. |
Location |
getFloorLocation()
Holds current floor location under the bot. |
Location |
getFloorNormal()
Holds current floor normal under the bot. |
int |
getHealth()
How much health the bot has left. |
UnrealId |
getId()
Unique Id of this self message instance. |
SelfLocalImpl |
getLocal()
|
Location |
getLocation()
An absolute location of the bot. |
String |
getName()
Human readable bot name. |
int |
getPrimaryAmmo()
How much ammo the bot has left for current weapon primary mode. |
Rotation |
getRotation()
Which direction the bot is facing in absolute terms. |
int |
getSecondaryAmmo()
How much ammo the bot has left for current weapon secondary mode. |
ISharedWorldObject |
getShared()
|
int |
getSmallArmor()
Also refered to as a "low armor". |
IStaticWorldObject |
getStatic()
|
int |
getTeam()
What team the bot is on. 255 is no team. 0-3 are red, blue, green, gold in that order. |
double |
getUDamageTime()
Time when the UDamage effect expires. |
Velocity |
getVelocity()
Absolute velocity of the bot as a vector of movement per one game second. |
String |
getWeapon()
Id of the weapon we are holding. |
boolean |
isAltFiring()
If we are firing in secondary firing mode. |
boolean |
isCrouched()
If we are currently crouched. |
boolean |
isShooting()
If the bot is shooting or not. |
boolean |
isVehicle()
If we are vehicle just these attr. are sent in SLF: "Id","Vehicle""Rotation", "Location","Velocity ","Name ","Team" ,"Health" "Armor","Adrenaline", "FloorLocation", "FloorNormal". |
boolean |
isWalking()
If we are currently in walking mode. |
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.SelfLocal |
---|
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 |
---|
protected UnrealId Id
protected UnrealId BotId
protected String Name
protected boolean Vehicle
protected Location Location
protected Velocity Velocity
protected Rotation Rotation
protected int Team
protected String Weapon
protected boolean Shooting
protected int Health
protected int PrimaryAmmo
protected int SecondaryAmmo
protected int Adrenaline
protected int Armor
protected int SmallArmor
protected boolean AltFiring
protected boolean Crouched
protected boolean Walking
protected Location FloorLocation
protected Location FloorNormal
protected String Combo
protected double UDamageTime
protected String Action
protected String EmotLeft
protected String EmotCenter
protected String EmotRight
protected String Bubble
protected String Anim
Constructor Detail |
---|
public SelfLocalImpl()
public SelfLocalImpl(UnrealId Id, UnrealId BotId, String Name, boolean Vehicle, Location Location, Velocity Velocity, Rotation Rotation, int Team, String Weapon, boolean Shooting, int Health, int PrimaryAmmo, int SecondaryAmmo, int Adrenaline, int Armor, int SmallArmor, boolean AltFiring, boolean Crouched, boolean Walking, Location FloorLocation, Location FloorNormal, String Combo, double UDamageTime, String Action, String EmotLeft, String EmotCenter, String EmotRight, String Bubble, String Anim)
Id
- Unique Id of this self message instance.BotId
- Unique Id of this bot.Name
- Human readable bot name.Vehicle
- If we are vehicle just these attr. are sent in SLF: "Id","Vehicle""Rotation", "Location","Velocity ","Name ","Team" ,"Health"
"Armor","Adrenaline", "FloorLocation", "FloorNormal".Location
- An absolute location of the bot.Velocity
- Absolute velocity of the bot as a vector of movement per one
game second.Rotation
- Which direction the bot is facing in absolute terms.Team
- What team the bot is on. 255 is no team. 0-3 are red,
blue, green, gold in that order.Weapon
- Id of the weapon we are holding. This is unique Id of an
item in our inventory and is different from the Id of the
item we pick up from the ground! We can parse this string to
look which weapon we hold. Weapon strings to look for
include: "AssaultRifle", "ShieldGun", "FlakCannon",
"BioRifle", "ShockRifle", "LinkGun", "SniperRifle",
"RocketLauncher", "Minigun", "LightingGun", "Translocator".
TODO: Look if this is all.Shooting
- If the bot is shooting or not.Health
- How much health the bot has left. Starts at 100, ranges from
0 to 200.PrimaryAmmo
- How much ammo the bot has left for current weapon primary
mode.SecondaryAmmo
- How much ammo the bot has left for current weapon secondary
mode. Weapon does not have to support sec. fire mode.Adrenaline
- How much adrenaline the bot has.Armor
- Combined size of high armor and low armor (or small armor). The high and low armor are tracked
separately. Low armor is limited to 50 points, while the
high armor can have up to 150 points. Both stacks can have a combined size of 150 points as well,
so if low armor is already at 50 points, high armor can have
100 points at max.SmallArmor
- Also refered to as a "low armor". Ranges from 0 to 50 points.AltFiring
- If we are firing in secondary firing mode.Crouched
- If we are currently crouched.Walking
- If we are currently in walking mode.FloorLocation
- Holds current floor location under the bot.FloorNormal
- Holds current floor normal under the bot.Combo
- Name of the current combo (None if no combo active).
Can be xGame.ComboBerserk, xGame.ComboDefensive, xGame.ComboInvis or xGame.ComboSpeed.
To trigger combo adrenaline needs to be at 100 (maximum) and no other combo can be active.UDamageTime
- Time when the UDamage effect expires. If the number is higher then the current
time, it means the bot has UDamage effect active right now.Action
- Name of the current BDI action.EmotLeft
- For UE2. Holds left emoticon of the bot, "None" means none set.EmotCenter
- For UE2. Holds center emoticon of the bot, "None" means none set.EmotRight
- For UE2. Holds right emoticon of the bot, "None" means none set.Bubble
- For UE2. Holds the bubble of the emoticon of the bot, "None" means none set.Anim
- For UE2. Current played animation of the bot.public SelfLocalImpl(Self original)
original
- public SelfLocalImpl(SelfLocalImpl original)
original
- public SelfLocalImpl(SelfLocal original)
original
- Method Detail |
---|
public void setSimTime(long SimTime)
SelfLocal
setSimTime
in class SelfLocal
public SelfLocalImpl clone()
clone
in interface ILocalWorldObject
clone
in class SelfLocal
public UnrealId getId()
getId
in interface IWorldObject
getId
in class SelfLocal
public UnrealId getBotId()
getBotId
in class SelfLocal
public String getName()
getName
in class SelfLocal
public boolean isVehicle()
isVehicle
in class SelfLocal
public Location getLocation()
getLocation
in class SelfLocal
public Velocity getVelocity()
getVelocity
in class SelfLocal
public Rotation getRotation()
getRotation
in class SelfLocal
public int getTeam()
getTeam
in class SelfLocal
public String getWeapon()
getWeapon
in class SelfLocal
public boolean isShooting()
isShooting
in class SelfLocal
public int getHealth()
getHealth
in class SelfLocal
public int getPrimaryAmmo()
getPrimaryAmmo
in class SelfLocal
public int getSecondaryAmmo()
getSecondaryAmmo
in class SelfLocal
public int getAdrenaline()
getAdrenaline
in class SelfLocal
public int getArmor()
getArmor
in class SelfLocal
public int getSmallArmor()
getSmallArmor
in class SelfLocal
public boolean isAltFiring()
isAltFiring
in class SelfLocal
public boolean isCrouched()
isCrouched
in class SelfLocal
public boolean isWalking()
isWalking
in class SelfLocal
public Location getFloorLocation()
getFloorLocation
in class SelfLocal
public Location getFloorNormal()
getFloorNormal
in class SelfLocal
public String getCombo()
getCombo
in class SelfLocal
public double getUDamageTime()
getUDamageTime
in class SelfLocal
public String getAction()
getAction
in class SelfLocal
public String getEmotLeft()
getEmotLeft
in class SelfLocal
public String getEmotCenter()
getEmotCenter
in class SelfLocal
public String getEmotRight()
getEmotRight
in class SelfLocal
public String getBubble()
getBubble
in class SelfLocal
public String getAnim()
getAnim
in class SelfLocal
public SelfLocalImpl getLocal()
getLocal
in class SelfLocal
public ISharedWorldObject getShared()
getShared
in class SelfLocal
public IStaticWorldObject getStatic()
getStatic
in class SelfLocal
public String toString()
toString
in class SelfLocal
public String toHtmlString()
toHtmlString
in class SelfLocal
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |