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

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

public class SendMessage
extends CommandMessage

Representation of the GameBots2004 command MESSAGE. Send a message to the world or just your team.


Field Summary
protected  Double FadeOut
          Enables text bubble.
protected  Boolean Global
          If True it is sent to everyone.
protected  UnrealId Id
          Here we can specify Id of the bot, that will receive this message privately (with "Private:" string at the beginning of the message).
static String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  Integer TeamIndex
          Specifying target team - can be 0 or 1.
protected  String Text
          Text to send.
 
Constructor Summary
SendMessage()
          Creates new instance of command SendMessage.
SendMessage(SendMessage original)
          Cloning constructor.
SendMessage(UnrealId Id, String Text, Integer TeamIndex, Boolean Global, Double FadeOut)
          Creates new instance of command SendMessage.
 
Method Summary
 Double getFadeOut()
          Enables text bubble.
 UnrealId getId()
          Here we can specify Id of the bot, that will receive this message privately (with "Private:" string at the beginning of the message).
 Integer getTeamIndex()
          Specifying target team - can be 0 or 1.
 String getText()
          Text to send.
 Boolean isGlobal()
          If True it is sent to everyone.
 SendMessage setFadeOut(Double FadeOut)
          Enables text bubble.
 SendMessage setGlobal(Boolean Global)
          If True it is sent to everyone.
 SendMessage setId(UnrealId Id)
          Here we can specify Id of the bot, that will receive this message privately (with "Private:" string at the beginning of the message).
 SendMessage setTeamIndex(Integer TeamIndex)
          Specifying target team - can be 0 or 1.
 SendMessage setText(String Text)
          Text to send.
 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

Id

protected UnrealId Id
Here we can specify Id of the bot, that will receive this message privately (with "Private:" string at the beginning of the message). Doesn't work for players (but if text bubble enabled, players will see this message above the bot head).


Text

protected String Text
Text to send.


TeamIndex

protected Integer TeamIndex
Specifying target team - can be 0 or 1. Works only in team games. If global is set to true then the message will be sent to all nevertheless.


Global

protected Boolean Global
If True it is sent to everyone. Otherwise (or if not specified), just your team.


FadeOut

protected Double FadeOut
Enables text bubble. Sets how long the bubble should stay (in seconds, counted ~ 12 + FadeOut seconds - dunno why, some UT mechanics?). If -1 the bubble won't be shown.

Constructor Detail

SendMessage

public SendMessage(UnrealId Id,
                   String Text,
                   Integer TeamIndex,
                   Boolean Global,
                   Double FadeOut)
Creates new instance of command SendMessage. Send a message to the world or just your team. Corresponding GameBots message for this command is MESSAGE.

Parameters:
Id - Here we can specify Id of the bot, that will receive this message privately (with "Private:" string at the beginning of the message). Doesn't work for players (but if text bubble enabled, players will see this message above the bot head).
Text - Text to send.
TeamIndex - Specifying target team - can be 0 or 1. Works only in team games. If global is set to true then the message will be sent to all nevertheless.
Global - If True it is sent to everyone. Otherwise (or if not specified), just your team.
FadeOut - Enables text bubble. Sets how long the bubble should stay (in seconds, counted ~ 12 + FadeOut seconds - dunno why, some UT mechanics?). If -1 the bubble won't be shown.

SendMessage

public SendMessage()
Creates new instance of command SendMessage. Send a message to the world or just your team. Corresponding GameBots message for this command is MESSAGE.

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


SendMessage

public SendMessage(SendMessage original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public UnrealId getId()
Here we can specify Id of the bot, that will receive this message privately (with "Private:" string at the beginning of the message). Doesn't work for players (but if text bubble enabled, players will see this message above the bot head).


setId

public SendMessage setId(UnrealId Id)
Here we can specify Id of the bot, that will receive this message privately (with "Private:" string at the beginning of the message). Doesn't work for players (but if text bubble enabled, players will see this message above the bot head).


getText

public String getText()
Text to send.


setText

public SendMessage setText(String Text)
Text to send.


getTeamIndex

public Integer getTeamIndex()
Specifying target team - can be 0 or 1. Works only in team games. If global is set to true then the message will be sent to all nevertheless.


setTeamIndex

public SendMessage setTeamIndex(Integer TeamIndex)
Specifying target team - can be 0 or 1. Works only in team games. If global is set to true then the message will be sent to all nevertheless.


isGlobal

public Boolean isGlobal()
If True it is sent to everyone. Otherwise (or if not specified), just your team.


setGlobal

public SendMessage setGlobal(Boolean Global)
If True it is sent to everyone. Otherwise (or if not specified), just your team.


getFadeOut

public Double getFadeOut()
Enables text bubble. Sets how long the bubble should stay (in seconds, counted ~ 12 + FadeOut seconds - dunno why, some UT mechanics?). If -1 the bubble won't be shown.


setFadeOut

public SendMessage setFadeOut(Double FadeOut)
Enables text bubble. Sets how long the bubble should stay (in seconds, counted ~ 12 + FadeOut seconds - dunno why, some UT mechanics?). If -1 the bubble won't be shown.


toString

public String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public String toHtmlString()

toMessage

public String toMessage()


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