cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class ObjectSelected

Package class diagram package ObjectSelected
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ObjectSelected
All Implemented Interfaces:
IWorldChangeEvent, IWorldEvent, cz.cuni.amis.utils.listener.Event

public class ObjectSelected
extends InfoMessage
implements IWorldEvent, IWorldChangeEvent

Definition of the event SEL.

Complete message documentation: Asynchronous message. Player selected an object in the environment in PlayerMousing state (by pressing ALT + SHIFT to switch to this state).


Field Summary
protected  Location ObjectHitLocation
          Location of the hit point that we have selected this actor through.
protected  UnrealId ObjectId
          Id of the actor the player selected (actors include other players or bots and other physical objects that can block your path and even level geometry actors).
protected  Location ObjectLocation
          Location of the actor the player selected.
protected  UnrealId PlayerId
          Unique Id of the player that this event is for.
protected  String PlayerName
          Name of the player that this event is for.
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  long SimTime
           
 
Constructor Summary
ObjectSelected()
          Parameter-less contructor for the message.
ObjectSelected(ObjectSelected original)
          Cloning constructor from the full message.
ObjectSelected(UnrealId PlayerId, String PlayerName, UnrealId ObjectId, Location ObjectLocation, Location ObjectHitLocation)
          Creates new instance of the message ObjectSelected.
 
Method Summary
 Location getObjectHitLocation()
          Location of the hit point that we have selected this actor through.
 UnrealId getObjectId()
          Id of the actor the player selected (actors include other players or bots and other physical objects that can block your path and even level geometry actors).
 Location getObjectLocation()
          Location of the actor the player selected.
 UnrealId getPlayerId()
          Unique Id of the player that this event is for.
 String getPlayerName()
          Name of the player that this event is for.
 long getSimTime()
          Simulation time in MILLI SECONDS !!!
protected  void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 String toHtmlString()
           
 String toJsonLiteral()
           
 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

SimTime

protected long SimTime

PlayerId

protected UnrealId PlayerId
Unique Id of the player that this event is for.


PlayerName

protected String PlayerName
Name of the player that this event is for.


ObjectId

protected UnrealId ObjectId
Id of the actor the player selected (actors include other players or bots and other physical objects that can block your path and even level geometry actors). Will be "None" if nothing was selected (or actor was deselected).


ObjectLocation

protected Location ObjectLocation
Location of the actor the player selected. Sent only if some object selected.


ObjectHitLocation

protected Location ObjectHitLocation
Location of the hit point that we have selected this actor through. Sent only if some object selected.

Constructor Detail

ObjectSelected

public ObjectSelected()
Parameter-less contructor for the message.


ObjectSelected

public ObjectSelected(UnrealId PlayerId,
                      String PlayerName,
                      UnrealId ObjectId,
                      Location ObjectLocation,
                      Location ObjectHitLocation)
Creates new instance of the message ObjectSelected. Asynchronous message. Player selected an object in the environment in PlayerMousing state (by pressing ALT + SHIFT to switch to this state). Corresponding GameBots message is SEL.

Parameters:
PlayerId - Unique Id of the player that this event is for.
PlayerName - Name of the player that this event is for.
ObjectId - Id of the actor the player selected (actors include other players or bots and other physical objects that can block your path and even level geometry actors). Will be "None" if nothing was selected (or actor was deselected).
ObjectLocation - Location of the actor the player selected. Sent only if some object selected.
ObjectHitLocation - Location of the hit point that we have selected this actor through. Sent only if some object selected.

ObjectSelected

public ObjectSelected(ObjectSelected original)
Cloning constructor from the full message.

Parameters:
original -
Method Detail

getSimTime

public long getSimTime()
Simulation time in MILLI SECONDS !!!

Specified by:
getSimTime in interface IWorldChangeEvent
Specified by:
getSimTime in interface IWorldEvent

setSimTime

protected void setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.


getPlayerId

public UnrealId getPlayerId()
Unique Id of the player that this event is for.


getPlayerName

public String getPlayerName()
Name of the player that this event is for.


getObjectId

public UnrealId getObjectId()
Id of the actor the player selected (actors include other players or bots and other physical objects that can block your path and even level geometry actors). Will be "None" if nothing was selected (or actor was deselected).


getObjectLocation

public Location getObjectLocation()
Location of the actor the player selected. Sent only if some object selected.


getObjectHitLocation

public Location getObjectHitLocation()
Location of the hit point that we have selected this actor through. Sent only if some object selected.


toString

public String toString()
Overrides:
toString in class InfoMessage

toHtmlString

public String toHtmlString()

toJsonLiteral

public String toJsonLiteral()
Overrides:
toJsonLiteral in class InfoMessage


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