Przeglądaj źródła

Add kbd tags to the 3D tutorial

Nathan Lovato 4 lat temu
rodzic
commit
164e6909c0

+ 3 - 3
getting_started/first_3d_game/01.game_setup.rst

@@ -41,11 +41,11 @@ Setting up the playable area
 We're going to create our main scene with a plain *Node* as its root. In the
 *Scene* dock, click the *Add Node* button represented by a "+" icon in the
 top-left and double-click on *Node*. Name the node "Main". Alternatively, to add
-a node to the scene, you can press Ctrl a (or Cmd a on MacOS).
+a node to the scene, you can press :kbd:`Ctrl + a` (or :kbd:`Cmd + a` on MacOS).
 
 |image5|
 
-Save the scene as ``Main.tscn`` by pressing Ctrl s (Cmd s on MacOS).
+Save the scene as ``Main.tscn`` by pressing :kbd:`Ctrl + s` (:kbd:`Cmd + s` on MacOS).
 
 We'll start by adding a floor that'll prevent the characters from falling. To
 create static colliders like the floor, walls, or ceilings, you can use
@@ -105,7 +105,7 @@ You should see a wide grey slab that covers the grid and blue and red axes in
 the viewport.
 
 We're going to move the ground down so we can see the floor grid. Select the
-*Ground* node, hold the Ctrl key down to turn on grid snapping (Cmd on MacOS),
+*Ground* node, hold the :kbd:`Ctrl` key down to turn on grid snapping (:kbd:`Cmd` on MacOS),
 and click and drag down on the Y axis. It's the green arrow in the move gizmo.
 
 |image13|

+ 2 - 2
getting_started/first_3d_game/03.player_movement_code.rst

@@ -229,7 +229,7 @@ Let's first split the 3D view to be able to freely navigate the scene and see
 what the camera sees.
 
 In the toolbar right above the viewport, click on *View*, then *2 Viewports*.
-You can also press Ctrl 2 (Cmd 2 on MacOS).
+You can also press :kbd:`Ctrl + 2` (:kbd:`Cmd + 2` on MacOS).
 
 |image5|
 
@@ -249,7 +249,7 @@ if it was attached to a crane.
 
 |image8|
 
-You can run the scene by pressing F6 and press the arrow keys to move the
+You can run the scene by pressing :kbd:`F6` and press the arrow keys to move the
 character.
 
 |image9|

+ 1 - 1
getting_started/first_3d_game/04.mob_scene.rst

@@ -162,7 +162,7 @@ We still have to destroy the mobs when they leave the screen. To do so, we'll
 connect our *VisibilityNotifier* node's ``screen_exited`` signal to the *Mob*.
 
 Head back to the 3D viewport by clicking on the *3D* label at the top of the
-editor. You can also press F2.
+editor. You can also press :kbd:`F2`.
 
 |image8|
 

+ 4 - 4
getting_started/first_3d_game/05.spawning_mobs.rst

@@ -35,7 +35,7 @@ a path, we won't see it from the camera preview.
 
 To find the view's limits, we can use some placeholder meshes. Your viewport
 should still be split into two parts, with the camera preview at the bottom. If
-that isn't the case, press Ctrl 2 (Cmd 2 on MacOS) to split the view into two.
+that isn't the case, press :kbd:`Ctrl + 2` (:kbd:`Cmd + 2` on MacOS) to split the view into two.
 Select the *Camera* node and click the *Preview* checkbox in the bottom
 viewport.
 
@@ -76,11 +76,11 @@ corner.
 |image9|
 
 We're going to create copies of the mesh and place them around the game area.
-Press Ctrl D (Cmd D on MacOS) to duplicate the node. You can also right-click
+Press :kbd:`Ctrl + D` (:kbd:`Cmd + D` on MacOS) to duplicate the node. You can also right-click
 the node in the *Scene* dock and select *Duplicate*. Move the copy down along
 the blue Z axis until it's right outside the camera's preview.
 
-Select both cylinders by pressing the Shift key and clicking on the unselected
+Select both cylinders by pressing the :kbd:`Shift` key and clicking on the unselected
 one and duplicate them.
 
 |image10|
@@ -255,7 +255,7 @@ Here is the complete ``Main.gd`` script so far, for reference.
        add_child(mob)
        mob.initialize(mob_spawn_location.translation, player_position)
 
-You can test the scene by pressing F6. You should see the monsters spawn and
+You can test the scene by pressing :kbd:`F6`. You should see the monsters spawn and
 move in a straight line.
 
 |image25|

+ 1 - 1
getting_started/first_3d_game/06.jump_and_squash.rst

@@ -261,7 +261,7 @@ destroy the mob.
 We will use the signal to add points to the score in the next lesson.
 
 With that, you should be able to kill monsters by jumping on them. You can press
-F5 to try the game and set ``Main.tscn`` as your project's main scene.
+:kbd:`F5` to try the game and set ``Main.tscn`` as your project's main scene.
 
 However, the player won't die yet. We'll work on that in the next part.
 

+ 1 - 1
getting_started/first_3d_game/07.killing_player.rst

@@ -76,7 +76,7 @@ a ``die()`` function that helps us put a descriptive label on the code.
    func _on_MobDetector_body_entered(_body):
        die()
 
-Try the game again by pressing F5. If everything is set up correctly,
+Try the game again by pressing :kbd:`F5`. If everything is set up correctly,
 the character should die when an enemy runs into it.
 
 However, note that this depends entirely on the size and position of the

+ 2 - 2
getting_started/first_3d_game/09.adding_animations.rst

@@ -117,8 +117,8 @@ Move the time cursor to the end of the animation, at ``1.2`` seconds. Set the Y
 translation to about ``0.35`` and the X rotation to ``-9`` degrees. Once again,
 create a key for both properties.
 
-You can preview the result by clicking the play button or pressing Shift
-D. Click the stop button or press S to stop playback.
+You can preview the result by clicking the play button or pressing :kbd:`Shift + D`.
+Click the stop button or press :kbd:`S` to stop playback.
 
 |image15|