|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.pogamut.Client.AgentBody
public class AgentBody
AgentBody is wrapping up communication with parser and execution of commands it receives messages, some of them are compressed and AgentBody provides their completion according to recent messages stored in knownObjects
Commands are available using methods of AgentBody like RunTo(navPoint)
AgentBody is also hidding difference between Remote and Local Parser
TODO: to throw exception or not to throw exception
Field Summary | |
---|---|
private java.util.ArrayList<SendCmdListener> |
commandListeners
listeners for commands - event fires when the command is sent) |
protected Flag<CommunicationState> |
communicationState
This is multiple-state flag, which is signalizing a communication state. |
protected java.lang.String |
desiredName
Name which we will send with INIT command to GB. |
protected Flag<java.lang.Boolean> |
exceptionOccured
Flag which indicates whether an exception occured in agent body. |
protected java.util.concurrent.CountDownLatch |
fireLogicLatch
This is used for awaiting start order from agent. |
AgentInitializer |
initializer
agent initializer obviously initializes agent - it contains all parameters which can be set before agent is spawned into the environment, so it fills actualy the GB INIT message |
KnownObjects |
knownObjects
knownObjects are used for composition of incoming message from old message and new (which got set only modified properties) knownObjects store old objects |
protected java.lang.String |
lastSentCommand
Last sent command - if the string in next command is the same, don't send it works only for MOVE command - it is either not necessary and more good looking to sent it so often so every 5th is sent |
protected Mediator |
mediator
Mediator through which we send messages to GB. |
private java.util.ArrayList<RcvMsgListener> |
messageListeners
messageListeners is a structure to hold registered listeners AgentBody is therefore able to notify all listening object about incomming message |
private java.util.concurrent.CountDownLatch |
messageProcessingLatch
|
private java.lang.Object |
messageProcessingMutex
Mutex for everything aroung message processing... |
private boolean |
messageProcessingShouldStop
|
private boolean |
messageProcessingStopped
|
private java.util.concurrent.BlockingQueue<MessageObject> |
messageQueue
Here we will store messages from the server when the message-processing is paused. |
protected int |
moveCounter
|
protected java.util.concurrent.CountDownLatch |
navpointsItemsReceivedLatch
This latch is raised whenever navpoints and items are received allowing agent's logic to continue. |
protected java.util.logging.Logger |
platformLog
bodyLogger is a pointer on global agentLogger and serves as a place to got warnings, info, etc. |
private java.util.HashMap<MessageType,java.util.ArrayList<RcvMsgListener>> |
typeMessageListeners
typedMessageListeners is a structure to hold listeners registred to single events (Messages) |
Constructor Summary | |
---|---|
AgentBody(java.util.logging.Logger logger)
initialize AgentBody - mainly Parser Parser - there are two possibilities: Parser on remote computer and Parser on same computer Remote Parser - Parser is on the same machine as Unreal Tournament - advantages - low network traffic - part of the load is on remote server, more of the system is available for agent logic - disadvantages - it is necessary to run Parser on another machine Local Parser - Parser is on the same machine as Client - advantages - we can run all on one machine - when on one machine, there is no unnecessary traffic - disadvantages - CPU load |
Method Summary | |
---|---|
void |
addInventory(java.lang.String inventoryClass)
add inventory of specified inventoryClass example of class: 'xWeapons.FlakCannon' |
void |
addRayToAutoTrace(int ID,
Triple direction,
java.lang.Double length,
boolean fastTrace,
boolean traceActors)
add ray to the array of rays emitted from the agent - see GB2004 documentation |
void |
addRcvMsgListener(RcvMsgListener listener)
add ReceiveMessageListener for all messages comming through body from Parser |
void |
addRcvMsgListener(RcvMsgListener listener,
java.util.Collection<MessageType> types)
Takes a collection of types (collection must be filled by MessageTypes) and adds listener to all specified types |
void |
addRcvMsgListener(RcvMsgListener listener,
MessageType[] types)
Takes an array of types (collection must be filled by MessageTypes) and adds listener to all specified types |
void |
addSendCmdListener(SendCmdListener listener)
add command listener to commandListeners |
void |
addTypedRcvMsgListener(RcvMsgListener listener,
MessageType type)
add listener to specified type of message common use when you want to listen only for instance to dead message, you add listener with proper message type |
protected void |
bindMediator(Mediator mediator)
Use this to attach mediator (receiver of messages / senders of commands) to the AgentBody. |
protected void |
bindName(java.lang.String name)
|
protected void |
clearListeners()
Call at the end of the agent run to remove all listeners inside objects flags. |
void |
closeClient()
Close the connection (if any exists). |
void |
configure(boolean autoTrace,
boolean manualSpawn,
java.lang.String name,
boolean invulnerable,
double visionTime,
boolean showFocalPoint,
boolean drawTraceLines,
boolean synchronousOff)
configure agent: autoTrace - start/stop autoTracing name - name of the agent - could be changed this way to for instance carry some additional info about agent (e.g. role in the team, mood etc.) -> good for visual observation - debugging and presentation of work manualSpawn - start/stop automatic spawn of agent after death - when true, you must spawn him manualy invulnerable - makes agent invulnerable from any threat visionTime - a frequency of synchronous batches - from 0.1 up to 2 - means from 10 per second to 1 per two seconds showFocalPoint - if the FocalPoint of the bot should be visible or not drawTraceLines - if the autoTracing lines should be visible in game or not synchronousOff - if all synchronous messages should be disabled for the agent or not |
void |
configureAutoTrace(boolean autoTrace)
configure autoTrace autoTrace - start/stop autoTracing |
void |
configureDrawTraceLines(boolean drawTraceLines)
|
void |
configureInvulnerable(boolean invulnerable)
configure invulnerable invulnerable - makes agent invulnerable from any threat |
void |
configureManualSpawn(boolean manualSpawn)
configure manualSpawn manualSpawn - start/stop automatic spawn of agent after death - when true, you must spawn him manualy |
void |
configureName(java.lang.String name)
configure name name - name of the agent - could be changed this way to for instance carry some additional info about agent (e.g. role in the team, mood etc.) -> good for visual observation - debugging and presentation of work |
void |
configureVisionTime(double visionTime)
configure visionTime visionTime - a frequency of synchronous batches - from 0.1 up to 2 - means from 10 per second to 1 per two seconds |
void |
contMove(float speed)
|
void |
dodge(Triple direction)
Dodge to the direction. |
void |
doubleJump()
just makes agent jump higher than jump, useful as a reflex action when hitting the wall sometimes agent encounter some obstacles, which could be jumped over (like girders etc.) |
void |
fastTrace(int id,
Triple to)
emit ray to specified location, returns message with a first actor it hits in that direction |
void |
fastTrace(int id,
Triple from,
Triple to)
emit ray to specified location, returns message with a first actor it hits in that direction |
void |
fireCommandEvent(SendCmdEvent e)
fire command event |
void |
fireEvent(RcvMsgEvent e)
Method to fire event - listener is History at the moment (4.1.2007) |
protected void |
fixNeighNavs()
Called after nav points are received from GameBot in state MAP_RECEIVE fix NeighNav.neighbour references (can't be fixed before, because we're receiveing identifiers to non-existing objects) |
protected void |
generalRunToLocation(Triple location)
general run to location sets general agent's speed and acceleration for all runTo commands the default settings are: Speed: 700 Acceleration: 450 therefore you can use those or choose your own settings |
protected java.lang.String |
getBindedName()
|
Flag<CommunicationState> |
getCommunicationStateFlag()
get communication state |
void |
getPath(Triple location,
int ID)
GetPath - calls Gamebots GETPATH - returns PTH with specified ID to match the query properly takes two parameters location - location the agent want to go to and ID for matching the queries together |
void |
getPathToLocation(int ID,
Triple location)
sends GETPATH to Gamebots - that will result with PATH sended back in PATH will be list of NavPoints and the path will be identified by the ID specified in this method |
void |
getPathToNavPoint(int ID,
NavPoint navPoint)
sends GETPATH to Gamebots - that will result with PATH sended back in PATH will be list of NavPoints and the path will be identified by the ID specified in this method |
void |
changeToBestWeapon()
changes agent's weapon to the best he has |
void |
changeWeapon(AddWeapon newWeapon)
changes to specified weapon - note it doesn't check whether he has it so it is recommended to be used with the AgentInventory - Inventory methods |
void |
init(java.lang.String name)
parametrized init - sets name and location where the bot will spawn |
void |
init(java.lang.String name,
int team,
boolean manualSpawn,
Triple location,
Triple rotation)
parametrized init - sets name, team and location, rotation where the bot will spawn sets as well manualSpawn - identifies whether bot will be spawned manualy or automaticaly after his death |
void |
init(java.lang.String name,
int team,
boolean manualSpawn,
Triple location,
Triple rotation,
java.lang.String skin,
double accuracy,
boolean targetLead)
most parametrized init |
void |
init(java.lang.String name,
int team,
Triple location)
parametrized init - sets name, team and location where the bot will spawn |
void |
init(java.lang.String name,
Triple location)
parametrized init - sets name and location where the bot will spawn |
boolean |
isNameBinded()
|
void |
jump()
just makes agent jump, useful as a reflex action when hitting the wall sometimes agent encounter some obstacles, which could be jumped over (like girders etc.) |
void |
jumpCustom(int height)
If we want to jump by an exact force. |
protected void |
messageReceived(MessageObject msg)
This is called from sendMessageToClient() when message which should be registered in agent memory is received (== other then communication info message). |
void |
move(double speed,
Triple location1,
Triple location2)
move along 2 locations - should result in more smooth move when following the path - recommended use = when the agent follows the path to the item for instance, do not move him by runTo but this method and suply it with next two locations instead of one in the case of runTo |
void |
moveAlongNavPoints(double speed,
NavPoint nav1,
NavPoint nav2)
move along 2 nav points (locations) - should result in more smooth move when following the path - recommended use = when the agent follows the path to the item for instance, do not move him by runTo but this method and suply it with next two navpoints instead of one in the case of runTo |
void |
moveContinuous()
continuously move agent to the direction to which he is faced |
void |
moveInch()
Sends INCH command to the bot -> move a little bit forward. |
protected void |
pauseMessageProcessing()
|
void |
pauseTheGame()
pause the game - all agents, not spectators and human players |
void |
ping()
ping to server |
AddItem |
processAddItem(AddItem newMessage)
parse name of the item from class, then exploit information from databasis stored in ItemCathegories and use those to create proper item object new message is then returned and fired as an event, so you can register listener for ADD_WEAPON etc. |
AddItem |
processAddItem(Item newMessage)
parse name of the item from class, then exploit information from databasis stored in ItemCathegories and use those to create proper item object new message is then returned and fired as an event, so you can register listener for ADD_WEAPON etc. |
Item |
processItem(Item newMessage)
parse name of the item from class, then exploit information from databasis stored in ItemCathegories and use those to create proper item object new message is then returned and fired as an event, so you can register listener for WEAPON etc. |
MessageObject |
processNewMessage(MessageObject newMessage)
Takes care about withdrawing old object from KnownObjects, update this object using new compressed object returns updated object with all properties |
java.lang.String |
receiveMessageFromClient()
From MediatorClientInterface ... has no meaning - we're passing commands to GB directly. |
void |
removeAllRaysFromAutoTrace()
removes all rays from auto trace - event default ones |
void |
removeRayFromAutoTrace(int ID)
remove ray of specified id from the array of auto trace rays |
void |
removeRcvMsgListener(RcvMsgListener listener)
remove ReceiveMessageListener |
void |
removeSendCmdListener(SendCmdListener listener)
remove command listener to commandListeners |
void |
removeTypedRcvMsgListener(RcvMsgListener listener,
MessageType type)
remove ReceiveMessageListener of specified type (note, type is not a part of listener and must be specified separatedly) |
void |
requestReachcheckLocation(int ID,
Triple to,
Triple from)
request whether location to is reachable from location from ID is for identifying the query when Gamebots send information back |
void |
requestReachcheckTargetFrom(int ID,
MessageObject target,
Triple from)
request whether location to is reachable from location from ID is for identifying the query when Gamebots send information back |
void |
respawn()
Respawns agent on random PlayerStart navpoint. |
void |
respawn(Triple location,
Triple rotation)
respawns agent on the specified place with specified rotation |
void |
restartAutoTraceRays()
set auto traces to default settings - 4 perpendicular rays |
protected void |
resumeMessageProcessing()
|
void |
runToLocation(Triple location)
sends RUNTO command with specified location as a parameter |
void |
runToNavPoint(NavPoint target)
runToNavPoint accepts NavPoint and sends command that makes bot to run to it |
void |
runToTarget(Item target)
similar to run to runToNavPoint |
void |
runToTarget(MessageObject target)
similar to run to runToNavPoint, target could be anything with UnrealID |
void |
runToTarget(Player target)
similar to run to runToNavPoint |
private void |
searchNavsForItems()
search through known navigation points (received at the beginning of the connection) and if the navpoint has itemID not equal to 0, get the item, set its properties and fire event |
void |
sendCommand(Command content)
send command is general method used to propagate command string via Parser to Gamebots |
void |
sendGlobalMessage(java.lang.String text)
sends message to the game global communication channel |
void |
sendMessageToClient(MessageObject msg)
From MediatorClientInterface (Sends message object to the client). |
private void |
sendMessageToClientUnsync(MessageObject msg)
Unsync method (messageProcessingMutex) of the sendMessageToClient(). |
void |
sendPrivateMessage(java.lang.String text)
sends message to the game team communication channel |
void |
setCrouch(boolean crouch)
set crouch |
void |
setLenghtOAutoTrace(int lenght,
int ID)
change lenght of all traces at once |
void |
setRun()
makes agent to run when moving |
void |
setSkin(java.lang.String name)
set skin of the agent to the skin of specified name |
void |
setWalk()
makes agent to walk when moving (he seems more like in cautious mode:)) |
void |
shoot(Player target)
agent start to shoot at location - target is optional, if it is provided server provides aim correction |
void |
shoot(Triple location)
agent start to shoot at location - target is optional, if it is provided server provides aim correction, so this method is without aim correction |
void |
shootAlternate(Player target)
agent start to shoot at location using alternate fire - target is optional, if it is provided server provides aim correction |
void |
shootAlternate(Triple location)
agent start to shoot at location using alternate fire - target is optional, if it is provided server provides aim correction, so this method is without aim correction |
void |
startAutoTrace()
start auto tracing - 3 default traces - left, front, right |
void |
startRecording(java.lang.String fileName)
start demo recording, it will be saved to the file with specified fileName the file will be located at the same machine as the server of the game for remote server use FTP (for instance) to get it |
void |
stop()
stops the move of agent |
void |
stopAutoTrace()
stop auto tracing |
void |
stopRecording()
stop recording of current record |
void |
stopShoot()
stops agent's fire |
void |
strafeToLocation(Triple whereToGo,
Triple whereToStrafeTo)
strafe is like RUNTO, but you move towards a destination while facing another point/object whereToGo is for location agent is running to, whereToStrafeTo is for location to face to |
void |
strafeToLocation(Triple whereToGo,
Triple whereToStrafeTo,
double speed)
strafe is like RUNTO, but you move towards a destination while facing another point/object whereToGo is for location agent is running to, whereToStrafeTo is for location to face to |
void |
strafeToTarget(MessageObject target,
Triple whereToGo)
strafe is like RUNTO, but you move towards a destination while facing another point/object whereToGo is for location agent is running to, target is for target to face to |
void |
throwWeapon()
throws away weapon the agent is carrying could be use for an exchange of weapons between agents as well as for trade and other applications |
void |
trace(int id,
Triple to,
boolean traceActors)
emit ray to specified location, returns message with a first actor it hits in that direction TraceActors is true if we want to take players to account |
void |
trace(int id,
Triple from,
Triple to,
boolean traceActors)
emit ray to specified location, returns message with a first actor it hits in that direction TraceActors is true if we want to take players to account |
void |
turn(int pitch,
int yaw,
int roll)
turn makes bot to turn in three specified directions pitch - yaw - roll - |
void |
turnHorizontal(int amount)
turn agent in horizontal way positive amount -> turn to right negative amount -> turn to left |
void |
turnToLocation(Triple location)
makes bot turn to specified location |
void |
turnToTarget(MessageObject target)
makes bot to turn towards specified target (e.g. another actor - player) |
void |
turnVertical(int amount)
turn agent in vertical way |
void |
unpauseTheGame()
pause the game - all agents, not spectators and human players |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Mediator mediator
It must me binded before agent is started! See Agent.startAgentXXX where it's done.
protected java.lang.String desiredName
public AgentInitializer initializer
protected java.lang.String lastSentCommand
protected int moveCounter
protected Flag<CommunicationState> communicationState
protected java.util.concurrent.CountDownLatch fireLogicLatch
Note that upon connection to GameBots a map is received (navpoints, items) and the user is given chance to preprocess those informations before the bot is spawned within the game of UT (before INIT is sent).
protected java.util.concurrent.CountDownLatch navpointsItemsReceivedLatch
protected Flag<java.lang.Boolean> exceptionOccured
public KnownObjects knownObjects
protected java.util.logging.Logger platformLog
private java.util.ArrayList<RcvMsgListener> messageListeners
private java.util.HashMap<MessageType,java.util.ArrayList<RcvMsgListener>> typeMessageListeners
private java.util.ArrayList<SendCmdListener> commandListeners
private java.lang.Object messageProcessingMutex
Used in resumeMessageProcessing(), sendMessageToClient(MessageObject msg)
private java.util.concurrent.BlockingQueue<MessageObject> messageQueue
private boolean messageProcessingShouldStop
private boolean messageProcessingStopped
private java.util.concurrent.CountDownLatch messageProcessingLatch
Constructor Detail |
---|
public AgentBody(java.util.logging.Logger logger)
Remote Parser - Parser is on the same machine as Unreal Tournament - advantages - low network traffic - part of the load is on remote server, more of the system is available for agent logic - disadvantages - it is necessary to run Parser on another machine
Local Parser - Parser is on the same machine as Client - advantages - we can run all on one machine - when on one machine, there is no unnecessary traffic - disadvantages - CPU load
logger
- Method Detail |
---|
protected void bindMediator(Mediator mediator)
Called from Agent class.
mediator
- public void addRcvMsgListener(RcvMsgListener listener)
listener
- public void addTypedRcvMsgListener(RcvMsgListener listener, MessageType type)
listener
- type
- public void addRcvMsgListener(RcvMsgListener listener, java.util.Collection<MessageType> types)
listener
- types
- public void addRcvMsgListener(RcvMsgListener listener, MessageType[] types)
listener
- types
- public void removeRcvMsgListener(RcvMsgListener listener)
listener
- public void removeTypedRcvMsgListener(RcvMsgListener listener, MessageType type)
listener
- type
- public void addSendCmdListener(SendCmdListener listener)
listener
- public void removeSendCmdListener(SendCmdListener listener)
listener
- public void fireEvent(RcvMsgEvent e)
public void fireCommandEvent(SendCmdEvent e)
e
- - SendCommandEventprotected void bindName(java.lang.String name)
protected java.lang.String getBindedName()
public boolean isNameBinded()
protected void fixNeighNavs()
private void searchNavsForItems()
public java.lang.String receiveMessageFromClient()
receiveMessageFromClient
in interface MediatorClientInterface
public Flag<CommunicationState> getCommunicationStateFlag()
protected void pauseMessageProcessing() throws java.lang.InterruptedException
java.lang.InterruptedException
protected void resumeMessageProcessing()
public void sendMessageToClient(MessageObject msg)
This method is used to pass the MessageObject from Parser to Agent. Here is the place where we have to process new messages according to CommunicationState.
sendMessageToClient
in interface MediatorClientInterface
msg
- private void sendMessageToClientUnsync(MessageObject msg)
msg
- protected void messageReceived(MessageObject msg)
msg
- deltaObject from Parserpublic MessageObject processNewMessage(MessageObject newMessage)
newMessage
- public Item processItem(Item newMessage)
newMessage
-
public AddItem processAddItem(AddItem newMessage)
newMessage
-
public AddItem processAddItem(Item newMessage)
newMessage
-
public void sendCommand(Command content)
content
- public void turn(int pitch, int yaw, int roll)
turn
in interface Commands
public void turnToLocation(Triple location)
turnToLocation
in interface Commands
public void turnToTarget(MessageObject target)
turnToTarget
in interface Commands
public void getPath(Triple location, int ID)
takes two parameters location - location the agent want to go to and ID for matching the queries together
location
- ID
- public void changeToBestWeapon()
changeToBestWeapon
in interface Commands
public void changeWeapon(AddWeapon newWeapon)
changeWeapon
in interface Commands
public void getPathToLocation(int ID, Triple location)
getPathToLocation
in interface Commands
ID
- location
- public void getPathToNavPoint(int ID, NavPoint navPoint)
getPathToNavPoint
in interface Commands
ID
- navPoint
- public void jump()
jump
in interface Commands
public void doubleJump()
doubleJump
in interface Commands
public void jumpCustom(int height)
height
- public void ping()
ping
in interface Commands
public void requestReachcheckLocation(int ID, Triple to, Triple from)
requestReachcheckLocation
in interface Commands
ID
- to
- from
- public void requestReachcheckTargetFrom(int ID, MessageObject target, Triple from)
requestReachcheckTargetFrom
in interface Commands
ID
- target
- -
Player, NavPoint or something else with UnrealIDfrom
- public void turnHorizontal(int amount)
turnHorizontal
in interface Commands
amount
- -
degreespublic void turnVertical(int amount)
turnVertical
in interface Commands
amount
- protected void generalRunToLocation(Triple location)
therefore you can use those or choose your own settings
location
- public void runToLocation(Triple location)
runToLocation
in interface Commands
public void runToNavPoint(NavPoint target)
runToNavPoint
in interface Commands
public void runToTarget(MessageObject target)
runToTarget
in interface Commands
public void runToTarget(Item target)
public void runToTarget(Player target)
public void sendGlobalMessage(java.lang.String text)
sendGlobalMessage
in interface Commands
public void sendPrivateMessage(java.lang.String text)
sendPrivateMessage
in interface Commands
public void setRun()
setRun
in interface Commands
public void setWalk()
setWalk
in interface Commands
public void shoot(Player target)
shoot
in interface Commands
public void shootAlternate(Player target)
shootAlternate
in interface Commands
public void shoot(Triple location)
shoot
in interface Commands
public void shootAlternate(Triple location)
shootAlternate
in interface Commands
public void stop()
stop
in interface Commands
public void stopShoot()
stopShoot
in interface Commands
public void strafeToLocation(Triple whereToGo, Triple whereToStrafeTo)
strafeToLocation
in interface Commands
public void strafeToLocation(Triple whereToGo, Triple whereToStrafeTo, double speed)
public void strafeToTarget(MessageObject target, Triple whereToGo)
strafeToTarget
in interface Commands
target
- - typically playerpublic void moveInch()
public void contMove(float speed)
public void init(java.lang.String name)
public void init(java.lang.String name, Triple location)
init
in interface Commands
public void init(java.lang.String name, int team, Triple location)
init
in interface Commands
public void init(java.lang.String name, int team, boolean manualSpawn, Triple location, Triple rotation)
init
in interface Commands
team
- - value 0, 1, 2, 3 - red, blue, gold, green (approximately)manualSpawn
- - whether agent respawn automaticaly or is respawned manuallypublic void init(java.lang.String name, int team, boolean manualSpawn, Triple location, Triple rotation, java.lang.String skin, double accuracy, boolean targetLead)
init
in interface Commands
name
- team
- - value 0, 1, 2, 3 - red, blue, gold, green (approximately)manualSpawn
- - whether agent respawn automaticaly or is respawned manuallylocation
- rotation
- skin
- - from the supported skins (see SkinTypes)accuracy
- - range [0-1]targetLead
- - boolean for engine if it should lead the bullets according to target movement, see GB docpublic void move(double speed, Triple location1, Triple location2)
move
in interface Commands
public void moveAlongNavPoints(double speed, NavPoint nav1, NavPoint nav2)
moveAlongNavPoints
in interface Commands
public void respawn(Triple location, Triple rotation)
respawn
in interface Commands
public void respawn()
respawn
in interface Commands
public void setCrouch(boolean crouch)
setCrouch
in interface Commands
public void startRecording(java.lang.String fileName)
startRecording
in interface Commands
public void stopRecording()
stopRecording
in interface Commands
public void throwWeapon()
throwWeapon
in interface Commands
public void trace(int id, Triple to, boolean traceActors)
trace
in interface Commands
id
- - id of requestto
- - to where the ray goestraceActors
- - whether to take actors (players) in accountpublic void trace(int id, Triple from, Triple to, boolean traceActors)
trace
in interface Commands
id
- - id of requestfrom
- - from where the ray goesto
- - to where the ray goestraceActors
- - whether to take actors (players) in accountpublic void fastTrace(int id, Triple from, Triple to)
fastTrace
in interface Commands
id
- - id of requestfrom
- - from where the ray goesto
- - to where the ray goespublic void fastTrace(int id, Triple to)
fastTrace
in interface Commands
id
- - id of requestto
- - to where the ray goespublic void closeClient() throws CantCloseConnectionException
MediatorClientInterface
closeClient
in interface MediatorClientInterface
CantCloseConnectionException
public void addInventory(java.lang.String inventoryClass)
addInventory
in interface Commands
public void addRayToAutoTrace(int ID, Triple direction, java.lang.Double length, boolean fastTrace, boolean traceActors)
addRayToAutoTrace
in interface Commands
ID
- - id of the auto-trace raydirection
- - direction of the raylength
- - ray lengthfastTrace
- - fast trace or not (fast is faster and is less demanding for server)traceActors
- - trace actors or notpublic void configure(boolean autoTrace, boolean manualSpawn, java.lang.String name, boolean invulnerable, double visionTime, boolean showFocalPoint, boolean drawTraceLines, boolean synchronousOff)
configure
in interface Commands
public void configureDrawTraceLines(boolean drawTraceLines)
public void configureAutoTrace(boolean autoTrace)
configureAutoTrace
in interface Commands
public void configureInvulnerable(boolean invulnerable)
configureInvulnerable
in interface Commands
public void configureManualSpawn(boolean manualSpawn)
configureManualSpawn
in interface Commands
public void configureName(java.lang.String name)
configureName
in interface Commands
public void configureVisionTime(double visionTime)
configureVisionTime
in interface Commands
public void removeRayFromAutoTrace(int ID)
removeRayFromAutoTrace
in interface Commands
public void moveContinuous()
moveContinuous
in interface Commands
public void pauseTheGame()
pauseTheGame
in interface Commands
public void unpauseTheGame()
unpauseTheGame
in interface Commands
public void removeAllRaysFromAutoTrace()
removeAllRaysFromAutoTrace
in interface Commands
public void restartAutoTraceRays()
restartAutoTraceRays
in interface Commands
public void startAutoTrace()
Commands
startAutoTrace
in interface Commands
public void stopAutoTrace()
Commands
stopAutoTrace
in interface Commands
public void setLenghtOAutoTrace(int lenght, int ID)
Commands
setLenghtOAutoTrace
in interface Commands
public void setSkin(java.lang.String name)
setSkin
in interface Commands
protected void clearListeners()
public void dodge(Triple direction)
1,0,0 ... dodge forward
0,1,0 ... dodge to the right
0,-1,0 ... dodge to the left
dodge
in interface Commands
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |