public class TeamChanged extends InfoMessage implements IWorldEvent, IWorldChangeEvent
Modifier and Type | Field and Description |
---|---|
protected int |
DesiredTeam
This is the team we wanted to change to (0 for red,1 for
blue, etc..).
|
protected UnrealId |
Id
Sent only for ControlServer connections, so they know which bot changed the team.
|
static String |
PROTOTYPE
Example how the message looks like - used during parser tests.
|
protected long |
SimTime |
protected boolean |
Success
If true team change was succesfull (it won't be succesfull if
we are changing to a team we already are in).
|
Constructor and Description |
---|
TeamChanged()
Parameter-less contructor for the message.
|
TeamChanged(TeamChanged original)
Cloning constructor from the full message.
|
TeamChanged(UnrealId Id,
boolean Success,
int DesiredTeam)
Creates new instance of the message TeamChanged.
|
Modifier and Type | Method and Description |
---|---|
int |
getDesiredTeam()
This is the team we wanted to change to (0 for red,1 for
blue, etc..).
|
UnrealId |
getId()
Sent only for ControlServer connections, so they know which bot changed the team.
|
long |
getSimTime()
Simulation time in MILLI SECONDS !!!
|
boolean |
isSuccess()
If true team change was succesfull (it won't be succesfull if
we are changing to a team we already are in).
|
protected void |
setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.
|
String |
toHtmlString() |
String |
toJsonLiteral() |
String |
toString() |
public static final String PROTOTYPE
protected long SimTime
protected UnrealId Id
protected boolean Success
protected int DesiredTeam
public TeamChanged()
public TeamChanged(UnrealId Id, boolean Success, int DesiredTeam)
Id
- Sent only for ControlServer connections, so they know which bot changed the team.Success
- If true team change was succesfull (it won't be succesfull if
we are changing to a team we already are in).DesiredTeam
- This is the team we wanted to change to (0 for red,1 for
blue, etc..).public TeamChanged(TeamChanged original)
original
- public long getSimTime()
getSimTime
in interface IWorldChangeEvent
getSimTime
in interface IWorldEvent
protected void setSimTime(long SimTime)
public UnrealId getId()
public boolean isSuccess()
public int getDesiredTeam()
public String toString()
toString
in class InfoMessage
public String toHtmlString()
public String toJsonLiteral()
toJsonLiteral
in class InfoMessage
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.