فهرست منبع

Added keyboard shortcuts. Reorder lists.

mitm 7 سال پیش
والد
کامیت
648e315906
1فایلهای تغییر یافته به همراه13 افزوده شده و 10 حذف شده
  1. 13 10
      src/docs/asciidoc/jme3/beginner/hello_input_system.adoc

+ 13 - 10
src/docs/asciidoc/jme3/beginner/hello_input_system.adoc

@@ -46,6 +46,7 @@ public class HelloInput extends SimpleApplication {
         HelloInput app = new HelloInput();
         app.start();
     }
+
     protected Geometry player;
     private boolean isRunning = true;
 
@@ -112,20 +113,20 @@ public class HelloInput extends SimpleApplication {
 Build and run the example.
 
 *  Press the Spacebar or click to rotate the cube.
-*  Press the J and K keys to move the cube.
-*  Press P to pause and unpause the game. While paused, the game should not respond to any input, other than `P`.
+*  Press the kbd:[J] and kbd:[K] keys to move the cube.
+*  Press kbd:[P] to pause and unpause the game. While paused, the game should not respond to any input, other than kbd:[P].
 
 
 == Defining Mappings and Triggers
 
 First you register each mapping name with its trigger(s). Remember the following:
 
-*  An input trigger can be a key press or mouse action. +
-For example a mouse movement, a mouse click, or pressing the letter "`P`".
-*  The mapping name is a string that you can choose. +
-The name should describe the action (e.g. "`Rotate`"), and not the trigger. Because the trigger can change.
-*  One named mapping can have several triggers. +
-For example, the "`Rotate`" action can be triggered by a click and by pressing the spacebar.
+*  An input trigger can be a key press or mouse action.
+**  For example a mouse movement, a mouse click, or pressing the letter kbd:[P] .
+*  The mapping name is a string that you can choose.
+**  The name should describe the action (e.g. "`Rotate`"), and not the trigger. Because the trigger can change.
+*  One named mapping can have several triggers.
+**  For example, the "`Rotate`" action can be triggered by a click and by pressing the spacebar.
 
 Have a look at the code:
 
@@ -212,7 +213,9 @@ In this example, we trigger the following actions:
     };
 ----
 
-You can also combine both listeners into one, the engine will send the appropriate events to each method (onAction or onAnalog). For example:
+You can also combine both listeners into one, the engine will send the appropriate events to each method (onAction or onAnalog).
+
+For example:
 
 [source,java]
 ----
@@ -360,6 +363,6 @@ Link to user-proposed solutions: <<jm3/solutions#,Some proposed solutions>> +
 
 == Conclusion
 
-You are now able to add custom interactions to your game: You know that you first have to define the key mappings, and then the actions for each mapping. You have learned to respond to mouse events and to the keyboard. You understand the difference between &#8220;analog (gradually repeated) and &#8220;digital (on/off) inputs.
+You are now able to add custom interactions to your game: You know that you first have to define the key mappings, and then the actions for each mapping. You have learned to respond to mouse events and to the keyboard. You understand the difference between "`analog`" (gradually repeated) and "`digital`" (on/off) inputs.
 
 Now you can already write a little interactive game! But wouldn't it be cooler if these old boxes were a bit more fancy? Let's continue with learning about <<jme3/beginner/hello_material#,materials>>.