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

Package class diagram package SpawnActor
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.SpawnActor

public class SpawnActor
extends CommandMessage

Representation of the GameBots2004 command SPAWNACTOR. Will spawn an actor in the game specified by Type (holds the class of the actor). Be carefull with what you spawn and where you spawn it. Possible use - for some additional inventory spawns.


Field Summary
protected  Location Location
          Location where the actor will be spawned.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  Rotation Rotation
          Initial rotation of the actor.
protected  String Type
          Holds the desired actor class (e.g.
 
Constructor Summary
SpawnActor()
          Creates new instance of command SpawnActor.
SpawnActor(Location Location, Rotation Rotation, String Type)
          Creates new instance of command SpawnActor.
SpawnActor(SpawnActor original)
          Cloning constructor.
 
Method Summary
 Location getLocation()
          Location where the actor will be spawned.
 Rotation getRotation()
          Initial rotation of the actor.
 String getType()
          Holds the desired actor class (e.g.
 SpawnActor setLocation(Location Location)
          Location where the actor will be spawned.
 SpawnActor setRotation(Rotation Rotation)
          Initial rotation of the actor.
 SpawnActor setType(String Type)
          Holds the desired actor class (e.g.
 String toHtmlString()
           
 String toMessage()
           
 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 String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Location

protected Location Location
Location where the actor will be spawned.


Rotation

protected Rotation Rotation
Initial rotation of the actor.


Type

protected String Type
Holds the desired actor class (e.g. xWeapons.FlakCannonPickup).

Constructor Detail

SpawnActor

public SpawnActor(Location Location,
                  Rotation Rotation,
                  String Type)
Creates new instance of command SpawnActor. Will spawn an actor in the game specified by Type (holds the class of the actor). Be carefull with what you spawn and where you spawn it. Possible use - for some additional inventory spawns. Corresponding GameBots message for this command is SPAWNACTOR.

Parameters:
Location - Location where the actor will be spawned.
Rotation - Initial rotation of the actor.
Type - Holds the desired actor class (e.g. xWeapons.FlakCannonPickup).

SpawnActor

public SpawnActor()
Creates new instance of command SpawnActor. Will spawn an actor in the game specified by Type (holds the class of the actor). Be carefull with what you spawn and where you spawn it. Possible use - for some additional inventory spawns. Corresponding GameBots message for this command is SPAWNACTOR.

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


SpawnActor

public SpawnActor(SpawnActor original)
Cloning constructor.

Parameters:
original -
Method Detail

getLocation

public Location getLocation()
Location where the actor will be spawned.


setLocation

public SpawnActor setLocation(Location Location)
Location where the actor will be spawned.


getRotation

public Rotation getRotation()
Initial rotation of the actor.


setRotation

public SpawnActor setRotation(Rotation Rotation)
Initial rotation of the actor.


getType

public String getType()
Holds the desired actor class (e.g. xWeapons.FlakCannonPickup).


setType

public SpawnActor setType(String Type)
Holds the desired actor class (e.g. xWeapons.FlakCannonPickup).


toString

public String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public String toHtmlString()

toMessage

public String toMessage()


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.