Improved keystroke formatting for shortcuts and key press menti… (#3257)

This commit is contained in:
Yuri Sizov
2020-03-10 01:50:53 +03:00
committed by GitHub
parent c4da962f3c
commit 37604be65f
27 changed files with 90 additions and 63 deletions

View File

@@ -566,7 +566,7 @@ Here is what the :ref:`Spatial <class_Spatial>` gizmo shows when you are using l
Notice how the arrows follow the rotation of the object on the left, which looks exactly
the same as the 3D example for local space.
.. note:: You can change between local and world space modes by pressing T or the little cube button
.. note:: You can change between local and world space modes by pressing :kbd:`T` or the little cube button
when you have a :ref:`Spatial <class_Spatial>` based node selected.
.. image:: img/LocalSpaceExampleGizmo.png
@@ -680,8 +680,8 @@ _________
To test the code, open up the scene named ``Testing_Area.tscn``, if it's not already opened up. We will be using
this scene as we go through the next few tutorial parts, so be sure to keep it open in one of your scene tabs.
Go ahead and test your code either by pressing ``F6`` with ``Testing_Area.tscn`` as the open tab, by pressing the
play button in the top right corner, or by pressing ``F5``.
Go ahead and test your code either by pressing :kbd:`F6` with ``Testing_Area.tscn`` as the open tab, by pressing the
play button in the top right corner, or by pressing :kbd:`F5`.
You should now be able to walk around, jump in the air, and look around using the mouse.
@@ -829,7 +829,7 @@ Now, when the player is sprinting, we'll use ``SPRINT_ACCEL`` instead of ``ACCEL
_________
You should now be able to sprint if you press the ``shift`` button, and can toggle the flash light on and off by pressing the ``F`` button!
You should now be able to sprint if you press :kbd:`Shift`, and can toggle the flash light on and off by pressing :kbd:`F`!
Go try it out! You can change the sprint-related class variables to make the player faster or slower when sprinting!

View File

@@ -23,10 +23,12 @@ Changing levels
Now that we have a fully working FPS, let's move to a more FPS-like level.
Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level.tscn``) and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level.tscn``).
Open up ``Space_Level.tscn`` (``assets/Space_Level_Objects/Space_Level.tscn``)
and/or ``Ruins_Level.tscn`` (``assets/Ruin_Level_Objects/Ruins_Level.tscn``).
``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels created for the purpose of this tutorial. Press ``F6`` to
play the open scene, or press the ``play current scene button``, and give each a try.
``Space_Level.tscn`` and ``Ruins_Level.tscn`` are complete custom FPS levels
created for the purpose of this tutorial. Press ``Play Current Scene`` button,
or :kbd:`F6` on keyboard, and give each a try.
.. warning:: ``Space_Level.tscn`` is more graphically demanding of the GPU than ``Ruins_Level.tscn``. If your computer is struggling to render
``Space_Level.tscn``, try using ``Ruins_Level.tscn`` instead.

View File

@@ -300,13 +300,13 @@ reach the point where the muzzle starts to flash.
light that escapes the muzzle when a bullet is fired. The muzzle is also sometimes referred to as the
barrel of the gun.
.. tip:: For finer control when scrubbing the timeline, press ``control`` and scroll forward with the mouse wheel to zoom in.
.. tip:: For finer control when scrubbing the timeline, press :kbd:`Ctrl` and scroll forward with the mouse wheel to zoom in.
Scrolling backwards will zoom out.
You can also change how the timeline scrubbing snaps by changing the value in ``Step (s)`` to a lower/higher value.
Once you get to a point you like, right click on the row for "Animation Player" and press insert key.
In the empty name field, enter ``animation_callback`` and press ``enter``.
Once you get to a point you like, right click on the row for "Animation Player" and press ``Insert Key``.
In the empty name field, enter ``animation_callback`` and press :kbd:`Enter`.
.. image:: img/AnimationPlayerInsertKey.png
@@ -324,7 +324,7 @@ Go to the "Rifle_fire" animation from the animation drop down. Add the call meth
animation track list by clicking the "Add Track" button above the list. Find the point where the muzzle starts
to flash and right click and press ``Insert Key`` to add a call method track point at that position on the track.
Type "animation_callback" into the name field of the pop up which opened and press ``enter``.
Type "animation_callback" into the name field of the pop up which opened and press :kbd:`Enter`.
Now we need to apply the callback method track to the knife animation. Select the "Knife_fire" animation and scroll to the bottom of the
animation tracks. Click the "Add Track" button above the list and add a method track.
@@ -334,7 +334,7 @@ Next find a point around the first third of the animation to place the animation
For this tutorial we are reusing the gun firing logic for our knife, so the animation has been named in a style that
is consistent with the other animations.
From there right click on the timeline and click "Insert Key". Put "animation_callback" into the name field and press ``enter``.
From there right click on the timeline and click "Insert Key". Put "animation_callback" into the name field and press :kbd:`Enter`.
.. tip:: Be sure to save your work!
@@ -1216,7 +1216,7 @@ Now we need to attach this script to all of the :ref:`RigidBody <class_RigidBody
Open up ``Testing_Area.tscn`` and select all the cubes parented to the ``Cubes`` node.
.. tip:: If you select the top cube, and then hold down ``shift`` and select the last cube, Godot will
.. tip:: If you select the top cube, and then hold down :kbd:`Shift` and select the last cube, Godot will
select all the cubes in-between!
Once you have all the cubes selected, scroll down in the inspector until you get to