mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Update played.gd/tscn filename to Played.gd to match example casing
This update aligns with the Dodge The Creeps example git example repo.
Reference:
0ec2fff5bf/2d/dodge_the_creeps
This commit is contained in:
@@ -63,7 +63,7 @@ override the value written in the script.
|
||||
|
||||
.. image:: img/export_variable.webp
|
||||
|
||||
Your ``player.gd`` script should already contain
|
||||
Your ``Player.gd`` script should already contain
|
||||
a ``_ready()`` and a ``_process()`` function.
|
||||
If you didn't select the default template shown above,
|
||||
create these functions while following the lesson.
|
||||
|
||||
@@ -10,7 +10,7 @@ Create a new scene and add a :ref:`Node <class_Node>` named ``Main``.
|
||||
be a container for handling game logic. It does not require 2D functionality itself.)
|
||||
|
||||
Click the **Instance** button (represented by a chain link icon) and select your saved
|
||||
``player.tscn``.
|
||||
``Player.tscn``.
|
||||
|
||||
.. image:: img/instance_scene.webp
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ the eye icon next to the ``Character`` or the ``Pivot`` nodes.
|
||||
|
||||
|image5|
|
||||
|
||||
Save the scene as ``player.tscn``
|
||||
Save the scene as ``Player.tscn``
|
||||
|
||||
With the nodes ready, we can almost get coding. But first, we need to define
|
||||
some input actions.
|
||||
|
||||
@@ -367,7 +367,7 @@ Child Scene*.
|
||||
|
||||
|image2|
|
||||
|
||||
In the popup, double-click ``player.tscn``. The character should appear in the
|
||||
In the popup, double-click ``Player.tscn``. The character should appear in the
|
||||
center of the viewport.
|
||||
|
||||
Adding a camera
|
||||
|
||||
@@ -7,7 +7,7 @@ In this part, you're going to code the monsters, which we'll call mobs. In the
|
||||
next lesson, we'll spawn them randomly around the playable area.
|
||||
|
||||
Let's design the monsters themselves in a new scene. The node structure is going
|
||||
to be similar to the ``player.tscn`` scene.
|
||||
to be similar to the ``Player.tscn`` scene.
|
||||
|
||||
Create a scene with, once again, a :ref:`CharacterBody3D <class_CharacterBody3D>` node as its root. Name it
|
||||
``Mob``. Add a child node :ref:`Node3D <class_Node3D>`, name it ``Pivot``. And drag and drop
|
||||
|
||||
@@ -72,7 +72,7 @@ see a list of named checkboxes.
|
||||
|
||||
|image4|
|
||||
|
||||
Next up are the ``Player`` and the ``Mob``. Open ``player.tscn`` by double-clicking
|
||||
Next up are the ``Player`` and the ``Mob``. Open ``Player.tscn`` by double-clicking
|
||||
the file in the *FileSystem* dock.
|
||||
|
||||
Select the *Player* node and set its *Collision -> Mask* to both "enemies" and
|
||||
|
||||
@@ -15,7 +15,7 @@ works well for hitboxes.
|
||||
Hitbox with the Area node
|
||||
-------------------------
|
||||
|
||||
Head back to the ``player.tscn`` scene and add a new child node :ref:`Area3D <class_Area3D>`. Name it
|
||||
Head back to the ``Player.tscn`` scene and add a new child node :ref:`Area3D <class_Area3D>`. Name it
|
||||
``MobDetector``
|
||||
Add a :ref:`CollisionShape3D <class_CollisionShape3D>` node as a child of it.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user