|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.globalse.arena.sword.hci.SwordControl
The class AdventurerControl is responsible for fetching the input data from Mouse, SpeechRecognizer and HeadMotionTracker. It takes as input the x and y coordinates from Mouse, the Bytes from the HeadMotionTracker which can be 0, 1 or 2,the Strings from Speechrecognizer, and commands from the GUI like from Buttons or menues. During the game it listens to any events from the devices (if they are activated by the launcher). It passes the events to SWORDengine. $Id: SwordControl.html,v 1.1 2003/02/12 18:06:21 schoecke Exp $
Constructor Summary | |
SwordControl(DrawManager pDrawManager,
ObjectManager pObjectManager,
Adventurer pAdventurer,
GameGUI gui)
Constructor with parameter. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
Control for the HMT |
void |
attackButton_actionPerformed(java.awt.event.ActionEvent event)
Gets the Input from the GUI like Items or command-buttons clicked |
void |
distributeChatMessage(java.lang.String msg)
distributes a chatMessage to all peers |
void |
dropButton_actionPerformed(java.awt.event.ActionEvent event)
Gets the Input from the GUI like Items or command-buttons clicked |
java.lang.String |
getObjectInInfluenceRange()
Gets the Object near the position |
void |
handleRecognizedPhrase(java.lang.String function)
Handles the recognized phrase. |
void |
loadChar()
Method loadChar, opens a dialog, calls loadCharacter from gameManager |
void |
lookAtButton_actionPerformed(java.awt.event.ActionEvent event)
Gets the Input from the GUI like Items or command-buttons clicked |
void |
magicButton_actionPerformed(java.awt.event.ActionEvent event)
Gets the Input from the GUI like Items or command-buttons clicked |
void |
mapMouseDown(java.awt.event.MouseEvent event)
Handles mouse events by map. |
void |
menuGameExit_actionPerformed(java.awt.event.ActionEvent e)
This method exits the game when you enter the menu and click on Exit Game. |
void |
menuSelectionGUI()
Gets the GUI's menu commands |
void |
messageToVoice(java.lang.String msg)
|
void |
moveTo(int speed)
Gets the moving input from keyboard or tracker moves the adventurer forward or backward stop when caps are releasd or tracker in neutral position |
void |
pickUpButton_actionPerformed(java.awt.event.ActionEvent event)
Gets the Input from the GUI like Items or command-buttons clicked |
void |
processEvent(Event e)
|
void |
rotate(int speed)
Gets the rotating input from keyboard or tracker rotates the adventurer left or right stop when caps are releasd or tracker in neutral position |
void |
saveChar()
Method saveChar, opens adialog, and calls saveCharacter from gameManager |
void |
saveGame()
Method saveGame. |
void |
setAdventurer(Adventurer a)
Method setAdventurer. |
boolean |
setSelectedObject(java.lang.String pSelectedObject)
Selected item was changed. |
boolean |
speechControlAvailable()
|
void |
startRecognizer()
Starts the SpeechRecognition which is only available for Mac OSX by now |
void |
stopRecognizer()
Stops the SpeechRecognition |
void |
talkButton_actionPerformed(java.awt.event.ActionEvent event)
Gets the Input from the GUI like Items or command-buttons clicked |
void |
useWithButton_actionPerformed(java.awt.event.ActionEvent event)
Gets the Input from the GUI like Items or command-buttons clicked |
void |
worldKeyPressed(java.awt.event.KeyEvent event)
Handles the key press events. |
void |
worldKeyReleased(java.awt.event.KeyEvent event)
Handles the key released events. |
void |
worldMouseDown(java.awt.event.MouseEvent event,
MathVector pMathVector)
Handles mouse events by world. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SwordControl(DrawManager pDrawManager, ObjectManager pObjectManager, Adventurer pAdventurer, GameGUI gui)
ObjectManager,
- AdventurerMethod Detail |
public void actionPerformed(java.awt.event.ActionEvent evt)
public boolean speechControlAvailable()
public void startRecognizer()
none
- public void stopRecognizer()
none
- public java.lang.String getObjectInInfluenceRange()
MathVector
- realWorldCoordinatespublic void handleRecognizedPhrase(java.lang.String function)
String
- recognized Phrasepublic void worldKeyPressed(java.awt.event.KeyEvent event)
keyEvent
- public void worldKeyReleased(java.awt.event.KeyEvent event)
KeyEvent
- public void worldMouseDown(java.awt.event.MouseEvent event, MathVector pMathVector)
MouseEvent,
- MathVector the top-left cornerpublic void mapMouseDown(java.awt.event.MouseEvent event)
MouseEvent
- public void moveTo(int speed)
public void rotate(int speed)
public void attackButton_actionPerformed(java.awt.event.ActionEvent event)
public void pickUpButton_actionPerformed(java.awt.event.ActionEvent event)
public void dropButton_actionPerformed(java.awt.event.ActionEvent event)
public void useWithButton_actionPerformed(java.awt.event.ActionEvent event)
public void talkButton_actionPerformed(java.awt.event.ActionEvent event)
public void magicButton_actionPerformed(java.awt.event.ActionEvent event)
public void lookAtButton_actionPerformed(java.awt.event.ActionEvent event)
public boolean setSelectedObject(java.lang.String pSelectedObject)
String
- itempublic void menuGameExit_actionPerformed(java.awt.event.ActionEvent e)
ActionEvent
- when clicking on Exit Game in the menupublic void menuSelectionGUI()
public void saveGame()
public void loadChar()
public void saveChar()
e
- public void setAdventurer(Adventurer a)
a
- instanceof Adventurerpublic void processEvent(Event e)
public void distributeChatMessage(java.lang.String msg)
public void messageToVoice(java.lang.String msg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |