|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.isi.gamebots.client.Bot | +--edu.tamu.gamebots.humanbot.HumanBot
A user interface that allows users to view the messages sent to the bot and to and send messages (actions) to the server.
Nested Class Summary |
Nested classes inherited from class edu.isi.gamebots.client.GamebotsConstants |
GamebotsConstants.TeamColorMap |
Field Summary | |
protected JTable |
table
The table that will hold the parsed visual infromation |
protected boolean |
updateTable
Flag to update the table during the next synchronous block |
Fields inherited from class edu.isi.gamebots.client.Bot |
client, clientListener, eventProcessor, log |
Fields inherited from interface edu.isi.gamebots.client.GamebotsConstants |
ACTOR_CLASS, ACTOR_ID, ACTOR_REACHABLE, ARG_ALT, ARG_AMOUNT, ARG_GLOBAL, ARG_TARGET, ARG_TEXT, ARG_WALK, BEG, BUMP, CHANGEWEAPON, CHECKREACH, DAMAGE, DEATH_DAMAGE_TYPE, DEATH_KILLER, DEFAULT_BOT_PORT, DEFAULT_VIZ_PORT, DIE, DOM, DOMPOINTS, END, FALSE, FINISHED, GAMESTATE, GETPATH, INFO, INIT, INV, ITEM, ITEM_ID, JUMP, KILL, LOCATION, MESSAGE, MOV, NAV, NODE_DOMINATION, NODE_INVENTORY, NODE_MOVER, NODE_NAVIGATION, OWNER, PATH, PING, PLAYER, PLAYER_AMMO, PLAYER_ARMOR, PLAYER_HEALTH, PLAYER_NAME, PLAYER_RADIUS, PLAYER_TEAM, PLAYER_WEAPON, PONG, ROTATE, ROTATION, RUNTO, SEE, SELF, SETWALK, SHOOT, STOP, STOP_SHOOT, STRAFE, TEAM_ANY, TEAM_BLUE, TEAM_GOLD, TEAM_GREEN, TEAM_NONE, TEAM_RED, TRUE, TURNTO, VELOCITY, WALL, WEAPON_1, WEAPON_2 |
Constructor Summary | |
HumanBot()
Creates a new instance of HumanBot |
|
HumanBot(UnrealMessageTextArea syncArea,
UnrealMessageTextArea asyncArea)
Creates a new HumanBot. |
Method Summary | |
void |
addJTableForMessages(JTable msgTable)
Set the table that will hold the parsed visual node information from sync messages. |
protected void |
connected()
Sends a message to the interface saying that the bot was connected. |
protected void |
disconnected()
Sends a message to the interface saying that the bot was disconnected. |
JComponent |
getView()
Returns a BotPanel for display. |
void |
init()
Sends all messages sent to the server to the debug log. |
protected void |
receivedAsyncMessage(Message message)
If it is an NFO message, initializes the bot with the world. |
protected void |
receivedSyncMessage(MessageBlock message)
Updates the interface when a new sync. |
void |
setASyncMessagesTextArea(UnrealMessageTextArea asyncArea)
Sets the UnrealMessageTextArea for the bot where the asynchronous messages will be displayed. |
void |
setCurrentBotStatePanel(CurrentBotStatePanel statePanel)
Sets the CurrentBotStatePanel for this bot. |
void |
setSyncMessagesTextArea(UnrealMessageTextArea syncArea)
Sets the UnrealMessageTextArea for the bot where the synchronous messages will be displayed. |
protected void |
setUpdateTable()
Flag the table to be updated on the next Synch. |
Methods inherited from class edu.isi.gamebots.client.Bot |
changeWeapon, checkReach, checkReach, connect, destroy, destroyImpl, disconnect, getClient, getInitialTeam, getLog, getName, getPath, init, jump, parseVector, receivedError, rotate, runTo, runTo, say, setName, setWalk, shoot, shoot, shoot, stop, stopShoot, strafe, turnTo, turnToLoc, turnToLoc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JTable table
The table that will hold the parsed visual infromation
protected boolean updateTable
Flag to update the table during the next synchronous block
Constructor Detail |
public HumanBot()
Creates a new instance of HumanBot
public HumanBot(UnrealMessageTextArea syncArea, UnrealMessageTextArea asyncArea)
Creates a new HumanBot.
syncArea
- The TextPanel that will hold the synchronous messagesasyncArea
- The TextPanel that will hold the asynchronous messagesMethod Detail |
public void setCurrentBotStatePanel(CurrentBotStatePanel statePanel)
Sets the CurrentBotStatePanel for this bot. This shows the current stats for the bot
statePanel
- The CurrentBotStatePanel for this botpublic void setSyncMessagesTextArea(UnrealMessageTextArea syncArea)
Sets the UnrealMessageTextArea for the bot where the synchronous messages will be displayed.
syncArea
- The UnrealMessageTextArea for the bot where the synchronous messages will be displayed.public void setASyncMessagesTextArea(UnrealMessageTextArea asyncArea)
Sets the UnrealMessageTextArea for the bot where the asynchronous messages will be displayed.
asyncArea
- The UnrealMessageTextArea for the bot where the asynchronous messages will be displayed.public void addJTableForMessages(JTable msgTable)
Set the table that will hold the parsed visual node information from sync messages.
msgTable
- JTable
that holds the information.protected void receivedAsyncMessage(Message message)
If it is an NFO message, initializes the bot with the world. Otherwise, it prints the message to the async message text panel.
receivedAsyncMessage
in class Bot
message
- The ASynchronous message to handle.protected void setUpdateTable()
Flag the table to be updated on the next Synch. message block.
public JComponent getView()
Returns a BotPanel
for display. Called by BotRunnerApp
getView
in class Bot
HumanBotPanel
of this botprotected void connected()
Sends a message to the interface saying that the bot was connected. This is an event handling method in Bot.
connected
in class Bot
protected void disconnected()
Sends a message to the interface saying that the bot was disconnected. This is an event handling method in Bot.
disconnected
in class Bot
protected void receivedSyncMessage(MessageBlock message)
Updates the interface when a new sync. message is received.
receivedSyncMessage
in class Bot
message
- The Message
object to handlepublic void init()
Sends all messages sent to the server to the debug log. If using BotRunnerApp, then this is sent to the lower half of the split pane in the display
init
in class Bot
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |