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

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

public class TurnTo
extends CommandMessage

Representation of the GameBots2004 command TURNTO. Specify a point, rotation value or object to turn towards.


Field Summary
protected  Location Location
          Location you want to face.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  Rotation Rotation
          Absolute rotation you want to spin to.
protected  UnrealId Target
          The unique id of a player/object/nav point/whatever that you want to face.
 
Constructor Summary
TurnTo()
          Creates new instance of command TurnTo.
TurnTo(TurnTo original)
          Cloning constructor.
TurnTo(UnrealId Target, Rotation Rotation, Location Location)
          Creates new instance of command TurnTo.
 
Method Summary
 Location getLocation()
          Location you want to face.
 Rotation getRotation()
          Absolute rotation you want to spin to.
 UnrealId getTarget()
          The unique id of a player/object/nav point/whatever that you want to face.
 TurnTo setLocation(Location Location)
          Location you want to face.
 TurnTo setRotation(Rotation Rotation)
          Absolute rotation you want to spin to.
 TurnTo setTarget(UnrealId Target)
          The unique id of a player/object/nav point/whatever that you want to face.
 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

Target

protected UnrealId Target
The unique id of a player/object/nav point/whatever that you want to face. Must be visible.


Rotation

protected Rotation Rotation
Absolute rotation you want to spin to. Must be provided as comma delimited ("0,50000,0") and should be in absolute terms and in UT units (2pi = 65535 units). Used only if no target provided. Rotation is parsed: First pitch (up, down), then yaw (left, right), the roll (no effect here, however it is an equivalent of doing a cartwheel).


Location

protected Location Location
Location you want to face. Normal rules for location. Only used if no Target or Rotation.

Constructor Detail

TurnTo

public TurnTo(UnrealId Target,
              Rotation Rotation,
              Location Location)
Creates new instance of command TurnTo. Specify a point, rotation value or object to turn towards. Corresponding GameBots message for this command is TURNTO.

Parameters:
Target - The unique id of a player/object/nav point/whatever that you want to face. Must be visible.
Rotation - Absolute rotation you want to spin to. Must be provided as comma delimited ("0,50000,0") and should be in absolute terms and in UT units (2pi = 65535 units). Used only if no target provided. Rotation is parsed: First pitch (up, down), then yaw (left, right), the roll (no effect here, however it is an equivalent of doing a cartwheel).
Location - Location you want to face. Normal rules for location. Only used if no Target or Rotation.

TurnTo

public TurnTo()
Creates new instance of command TurnTo. Specify a point, rotation value or object to turn towards. Corresponding GameBots message for this command is TURNTO.

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


TurnTo

public TurnTo(TurnTo original)
Cloning constructor.

Parameters:
original -
Method Detail

getTarget

public UnrealId getTarget()
The unique id of a player/object/nav point/whatever that you want to face. Must be visible.


setTarget

public TurnTo setTarget(UnrealId Target)
The unique id of a player/object/nav point/whatever that you want to face. Must be visible.


getRotation

public Rotation getRotation()
Absolute rotation you want to spin to. Must be provided as comma delimited ("0,50000,0") and should be in absolute terms and in UT units (2pi = 65535 units). Used only if no target provided. Rotation is parsed: First pitch (up, down), then yaw (left, right), the roll (no effect here, however it is an equivalent of doing a cartwheel).


setRotation

public TurnTo setRotation(Rotation Rotation)
Absolute rotation you want to spin to. Must be provided as comma delimited ("0,50000,0") and should be in absolute terms and in UT units (2pi = 65535 units). Used only if no target provided. Rotation is parsed: First pitch (up, down), then yaw (left, right), the roll (no effect here, however it is an equivalent of doing a cartwheel).


getLocation

public Location getLocation()
Location you want to face. Normal rules for location. Only used if no Target or Rotation.


setLocation

public TurnTo setLocation(Location Location)
Location you want to face. Normal rules for location. Only used if no Target or Rotation.


toString

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

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()