Keyboard :
Two set of keys can be used :
- Traditional Arrows (Move/Rotate) + Space (Hit)
- Numeric pad using 2,8 (Move), 4,8 (Rotate), 5 (Hit)
Depending on the direction you're rotating (right/left), the "Angle" parameter of Rotate will automatically be changed to a positive/negative value.
The command is linked to the "Pressed Listener" of the keyboard : it means that the robot will move again and again as long as you keep on pressing the key.
Mouse :
You can also control the command using the mouse.
However, commands will only be used once even if you keep on clicking. This is because there is no event in MouseListener class for such thing.
( But this could be added easily, for exemple with a boolean set to true when mouse button pressed, and to false when it is released ).
For the moment, if you want to change parameters, you have to use the forms like before.
Sliders will be added later to supplement the control panel.

No comments:
Post a Comment