Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update getting started 2D to 4.3 #9834

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions getting_started/first_2d_game/06.heads_up_display.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,20 @@ mobs to remove themselves. We can do this with the "group" feature.

In the ``Mob`` scene, select the root node and click the "Node" tab next to the
Inspector (the same place where you find the node's signals). Next to "Signals",
click "Groups" and you can type a new group name and click "Add".
click "Groups" to open the group overview
and the "+" button to open the "Create New Group" dialog.

.. image:: img/group_tab.webp

Now all mobs will be in the "mobs" group. We can then add the following line to
the ``new_game()`` function in ``Main``:
Name the group ``mobs`` and click "ok" to add a new scene group.

.. image:: img/add_group_dialog.webp

Now all mobs will be in the "mobs" group.

.. image:: img/scene_group_mobs.webp

We can then add the following line to the ``new_game()`` function in ``Main``:

.. tabs::
.. code-tab:: gdscript GDScript
Expand Down
2 changes: 2 additions & 0 deletions getting_started/first_2d_game/07.finishing-up.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ All audio is automatically imported with the ``Loop`` setting disabled.
If you want the music to loop seamlessly, click on the Stream file arrow,
select ``Make Unique``, then click on the Stream file and check the ``Loop`` box.

.. image:: img/unique_resource_music.webp

To play the music, add ``$Music.play()`` in the ``new_game()``
function and ``$Music.stop()`` in the ``game_over()`` function.

Expand Down
Binary file not shown.
Binary file modified getting_started/first_2d_game/img/attach_node_window.webp
Binary file not shown.
Binary file modified getting_started/first_2d_game/img/group_tab.webp
Binary file not shown.
Binary file modified getting_started/first_2d_game/img/input-mapping-add-action.webp
Binary file not shown.
Binary file modified getting_started/first_2d_game/img/input-mapping-add-key.webp
Binary file not shown.
Binary file modified getting_started/first_2d_game/img/input-mapping-completed.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified getting_started/first_2d_game/img/setting-stretch-mode.webp
Binary file not shown.
Binary file not shown.