cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class Respawn

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Respawn

public class Respawn
extends CommandMessage

Representation of the GameBots2004 command RESPAWN. Use this to kill bot and force him to respawn, you can specify start location and rotation. Work also for human players and spectators in the game. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed).


Field Summary
protected  UnrealId Id
          Id of the bot to be respawned (not used if command sent to bot).
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  Location StartLocation
          Where bot respawns.
protected  Rotation StartRotation
          Initial rotation of the bot.
 
Constructor Summary
Respawn()
          Creates new instance of command Respawn.
Respawn(Respawn original)
          Cloning constructor.
Respawn(UnrealId Id, Location StartLocation, Rotation StartRotation)
          Creates new instance of command Respawn.
 
Method Summary
 UnrealId getId()
          Id of the bot to be respawned (not used if command sent to bot).
 Location getStartLocation()
          Where bot respawns.
 Rotation getStartRotation()
          Initial rotation of the bot.
 Respawn setId(UnrealId Id)
          Id of the bot to be respawned (not used if command sent to bot).
 Respawn setStartLocation(Location StartLocation)
          Where bot respawns.
 Respawn setStartRotation(Rotation StartRotation)
          Initial rotation of the bot.
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Id

protected UnrealId Id
Id of the bot to be respawned (not used if command sent to bot).


StartLocation

protected Location StartLocation
Where bot respawns. If you want to respawn bot at random, don't specify StartLocation.


StartRotation

protected Rotation StartRotation
Initial rotation of the bot.

Constructor Detail

Respawn

public Respawn(UnrealId Id,
               Location StartLocation,
               Rotation StartRotation)
Creates new instance of command Respawn. Use this to kill bot and force him to respawn, you can specify start location and rotation. Work also for human players and spectators in the game. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Corresponding GameBots message for this command is RESPAWN.

Parameters:
Id - Id of the bot to be respawned (not used if command sent to bot).
StartLocation - Where bot respawns. If you want to respawn bot at random, don't specify StartLocation.
StartRotation - Initial rotation of the bot.

Respawn

public Respawn()
Creates new instance of command Respawn. Use this to kill bot and force him to respawn, you can specify start location and rotation. Work also for human players and spectators in the game. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Corresponding GameBots message for this command is RESPAWN.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


Respawn

public Respawn(Respawn original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public UnrealId getId()
Id of the bot to be respawned (not used if command sent to bot).


setId

public Respawn setId(UnrealId Id)
Id of the bot to be respawned (not used if command sent to bot).


getStartLocation

public Location getStartLocation()
Where bot respawns. If you want to respawn bot at random, don't specify StartLocation.


setStartLocation

public Respawn setStartLocation(Location StartLocation)
Where bot respawns. If you want to respawn bot at random, don't specify StartLocation.


getStartRotation

public Rotation getStartRotation()
Initial rotation of the bot.


setStartRotation

public Respawn setStartRotation(Rotation StartRotation)
Initial rotation of the bot.


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()