public class KeyEvent extends InfoMessage implements IWorldEvent, IWorldChangeEvent
| Modifier and Type | Field and Description |
|---|---|
protected String |
Action
Action that happened with the key.
|
protected String |
Key
Key that has been pressed, released or held.
|
protected String |
Player
Name of player who has triggered the key event.
|
protected UnrealId |
PlayerId
Id of player who has triggered the key event.
|
protected String |
PlayerName
Name of player who has triggered the key event.
|
static String |
PROTOTYPE
Example how the message looks like - used during parser tests.
|
protected long |
SimTime |
protected UnrealId |
ViewTarget
If the player that triggered the key event is observing another player in the game, then the id of that observed player will be exported here.
|
| Constructor and Description |
|---|
KeyEvent()
Parameter-less contructor for the message.
|
KeyEvent(KeyEvent original)
Cloning constructor from the full message.
|
KeyEvent(String Player,
UnrealId PlayerId,
String PlayerName,
UnrealId ViewTarget,
String Action,
String Key)
Creates new instance of the message KeyEvent.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAction()
Action that happened with the key.
|
String |
getKey()
Key that has been pressed, released or held.
|
String |
getPlayer()
Name of player who has triggered the key event.
|
UnrealId |
getPlayerId()
Id of player who has triggered the key event.
|
String |
getPlayerName()
Name of player who has triggered the key event.
|
long |
getSimTime()
Simulation time in MILLI SECONDS !!!
|
UnrealId |
getViewTarget()
If the player that triggered the key event is observing another player in the game, then the id of that observed player will be exported here.
|
protected void |
setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.
|
String |
toHtmlString() |
String |
toJsonLiteral() |
String |
toString() |
public static final String PROTOTYPE
protected long SimTime
protected String Player
protected UnrealId PlayerId
protected String PlayerName
protected UnrealId ViewTarget
protected String Action
protected String Key
public KeyEvent()
public KeyEvent(String Player, UnrealId PlayerId, String PlayerName, UnrealId ViewTarget, String Action, String Key)
Player - Name of player who has triggered the key event.PlayerId - Id of player who has triggered the key event.PlayerName - Name of player who has triggered the key event.ViewTarget - If the player that triggered the key event is observing another player in the game, then the id of that observed player will be exported here.Action - Action that happened with the key. Possible are: PRESS, HOLD, RELEASE.Key - Key that has been pressed, released or held. See Interactions.EInputKey for choices - these are without the "IK_" prefix with original case.public KeyEvent(KeyEvent original)
original - public long getSimTime()
getSimTime in interface IWorldChangeEventgetSimTime in interface IWorldEventprotected void setSimTime(long SimTime)
public String getPlayer()
public UnrealId getPlayerId()
public String getPlayerName()
public UnrealId getViewTarget()
public String getAction()
public String getKey()
public String toString()
toString in class InfoMessagepublic String toHtmlString()
public String toJsonLiteral()
toJsonLiteral in class InfoMessageCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.