Skip to content

Commit cd92be0

Browse files
committed
Update references to private class methods across the docs
1 parent ca74950 commit cd92be0

File tree

17 files changed

+60
-60
lines changed

17 files changed

+60
-60
lines changed

contributing/development/core_and_modules/object_class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Adding signals to a class is done in ``_bind_methods``, using the
240240
Notifications
241241
-------------
242242

243-
All objects in Godot have a :ref:`_notification <class_Object_method__notification>`
243+
All objects in Godot have a :ref:`_notification <class_Object_private_method__notification>`
244244
method that allows it to respond to engine level callbacks that may relate to it.
245245
More information can be found on the :ref:`doc_godot_notifications` page.
246246

getting_started/step_by_step/signals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ We need to do two operations to connect the nodes via code:
266266
listen to the Timer's "timeout" signal.
267267

268268
We want to connect the signal when the scene is instantiated, and we can do that
269-
using the :ref:`Node._ready() <class_Node_method__ready>` built-in function,
269+
using the :ref:`Node._ready() <class_Node_private_method__ready>` built-in function,
270270
which is called automatically by the engine when a node is fully instantiated.
271271

272272
To get a reference to a node relative to the current one, we use the method

tutorials/best_practices/godot_notifications.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Godot notifications
44
===================
55

66
Every Object in Godot implements a
7-
:ref:`_notification <class_Object_method__notification>` method. Its purpose is to
7+
:ref:`_notification <class_Object_private_method__notification>` method. Its purpose is to
88
allow the Object to respond to a variety of engine-level callbacks that may
99
relate to it. For example, if the engine tells a
1010
:ref:`CanvasItem <class_CanvasItem>` to "draw", it will call
@@ -53,7 +53,7 @@ One can access all these custom notifications from the universal
5353
overridden by scripts.
5454

5555
A classic example is the
56-
:ref:`_init <class_Object_method__init>` method in Object. While it has no
56+
:ref:`_init <class_Object_private_method__init>` method in Object. While it has no
5757
``NOTIFICATION_*`` equivalent, the engine still calls the method. Most languages
5858
(except C#) rely on it as a constructor.
5959

tutorials/inputs/inputevent.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,35 +74,35 @@ received input, in order:
7474
2. Next if an embedded Window is focused, the event is sent to that Window and processed in
7575
the Windows Viewport and afterwards treated as handled. If no embedded Window is focused,
7676
the event is sent to the nodes of the current viewport in the following order.
77-
3. First of all, the standard :ref:`Node._input() <class_Node_method__input>` function
77+
3. First of all, the standard :ref:`Node._input() <class_Node_private_method__input>` function
7878
will be called in any node that overrides it (and hasn't disabled input processing with :ref:`Node.set_process_input() <class_Node_method_set_process_input>`).
7979
If any function consumes the event, it can call :ref:`Viewport.set_input_as_handled() <class_Viewport_method_set_input_as_handled>`, and the event will
8080
not spread any more. This ensures that you can filter all events of interest, even before the GUI.
81-
For gameplay input, :ref:`Node._unhandled_input() <class_Node_method__unhandled_input>` is generally a better fit, because it allows the GUI to intercept the events.
81+
For gameplay input, :ref:`Node._unhandled_input() <class_Node_private_method__unhandled_input>` is generally a better fit, because it allows the GUI to intercept the events.
8282
4. Second, it will try to feed the input to the GUI, and see if any
8383
control can receive it. If so, the :ref:`Control <class_Control>` will be called via the
84-
virtual function :ref:`Control._gui_input() <class_Control_method__gui_input>` and the signal
84+
virtual function :ref:`Control._gui_input() <class_Control_private_method__gui_input>` and the signal
8585
"gui_input" will be emitted (this function is re-implementable by
8686
script by inheriting from it). If the control wants to "consume" the
8787
event, it will call :ref:`Control.accept_event() <class_Control_method_accept_event>` and the event will
8888
not spread any more. Use the :ref:`Control.mouse_filter <class_Control_property_mouse_filter>`
8989
property to control whether a :ref:`Control <class_Control>` is notified
90-
of mouse events via :ref:`Control._gui_input() <class_Control_method__gui_input>`
90+
of mouse events via :ref:`Control._gui_input() <class_Control_private_method__gui_input>`
9191
callback, and whether these events are propagated further.
92-
5. If so far no one consumed the event, the :ref:`Node._shortcut_input() <class_Node_method__shortcut_input>` callback
92+
5. If so far no one consumed the event, the :ref:`Node._shortcut_input() <class_Node_private_method__shortcut_input>` callback
9393
will be called if overridden (and not disabled with
9494
:ref:`Node.set_process_shortcut_input() <class_Node_method_set_process_shortcut_input>`).
9595
This happens only for :ref:`InputEventKey <class_InputEventKey>`,
9696
:ref:`InputEventShortcut <class_InputEventShortcut>` and :ref:`InputEventJoypadButton <class_InputEventJoypadButton>`.
9797
If any function consumes the event, it can call :ref:`Viewport.set_input_as_handled() <class_Viewport_method_set_input_as_handled>`, and the
9898
event will not spread any more. The shortcut input callback is ideal for treating events that are intended as shortcuts.
99-
6. If so far no one consumed the event, the :ref:`Node._unhandled_key_input() <class_Node_method__unhandled_key_input>` callback
99+
6. If so far no one consumed the event, the :ref:`Node._unhandled_key_input() <class_Node_private_method__unhandled_key_input>` callback
100100
will be called if overridden (and not disabled with
101101
:ref:`Node.set_process_unhandled_key_input() <class_Node_method_set_process_unhandled_key_input>`).
102102
This happens only if the event is a :ref:`InputEventKey <class_InputEventKey>`.
103103
If any function consumes the event, it can call :ref:`Viewport.set_input_as_handled() <class_Viewport_method_set_input_as_handled>`, and the
104104
event will not spread any more. The unhandled key input callback is ideal for key events.
105-
7. If so far no one consumed the event, the :ref:`Node._unhandled_input() <class_Node_method__unhandled_input>` callback
105+
7. If so far no one consumed the event, the :ref:`Node._unhandled_input() <class_Node_private_method__unhandled_input>` callback
106106
will be called if overridden (and not disabled with
107107
:ref:`Node.set_process_unhandled_input() <class_Node_method_set_process_unhandled_input>`).
108108
If any function consumes the event, it can call :ref:`Viewport.set_input_as_handled() <class_Viewport_method_set_input_as_handled>`, and the
@@ -112,10 +112,10 @@ received input, in order:
112112
enabled in :ref:`Project Settings <class_ProjectSettings_property_physics/common/enable_object_picking>`.
113113
In the case of a 3D scene if a :ref:`Camera3D <class_Camera3D>` is assigned to the Viewport, a ray
114114
to the physics world (in the ray direction from the click) will be cast. If this ray hits an object,
115-
it will call the :ref:`CollisionObject3D._input_event() <class_CollisionObject3D_method__input_event>`
115+
it will call the :ref:`CollisionObject3D._input_event() <class_CollisionObject3D_private_method__input_event>`
116116
function in the relevant physics object (bodies receive this callback by default, but areas do
117117
not. This can be configured through :ref:`Area3D <class_Area3D>` properties).
118-
In the case of a 2D scene, conceptually the same happens with :ref:`CollisionObject2D._input_event() <class_CollisionObject2D_method__input_event>`.
118+
In the case of a 2D scene, conceptually the same happens with :ref:`CollisionObject2D._input_event() <class_CollisionObject2D_private_method__input_event>`.
119119

120120
When sending events to its child and descendant nodes, the viewport will do so, as depicted in
121121
the following graphic, in a reverse depth-first order, starting with the node at the bottom of
@@ -124,15 +124,15 @@ and SubViewports.
124124

125125
.. image:: img/input_event_scene_flow.png
126126

127-
This order doesn't apply to :ref:`Control._gui_input() <class_Control_method__gui_input>`, which uses
127+
This order doesn't apply to :ref:`Control._gui_input() <class_Control_private_method__gui_input>`, which uses
128128
a different method based on event location or focused Control.
129129

130130
Since Viewports don't send events to other :ref:`SubViewports <class_SubViewport>`, one of the following
131131
methods has to be used:
132132

133133
1. Use a :ref:`SubViewportContainer <class_SubViewportContainer>`, which automatically
134134
sends events to its child :ref:`SubViewports <class_SubViewport>` after
135-
:ref:`Node._input() <class_Node_method__input>` or :ref:`Control._gui_input() <class_Control_method__gui_input>`.
135+
:ref:`Node._input() <class_Node_private_method__input>` or :ref:`Control._gui_input() <class_Control_private_method__gui_input>`.
136136
2. Implement event propagation based on the individual requirements.
137137

138138
GUI events also travel up the scene tree but, since these events target

tutorials/io/binary_serialization_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ For each property:
453453
Not all properties are included. Only properties that are configured with the
454454
:ref:`PROPERTY_USAGE_STORAGE<class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE>`
455455
flag set will be serialized. You can add a new usage flag to a property by overriding the
456-
:ref:`_get_property_list<class_Object_method__get_property_list>`
456+
:ref:`_get_property_list<class_Object_private_method__get_property_list>`
457457
method in your class. You can also check how property usage is configured by
458458
calling ``Object._get_property_list`` See
459459
:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` for the

tutorials/io/saving_games.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ approach for storing game state, and you can use it with the functions
376376
Note that not all properties are included. Only properties that are configured
377377
with the :ref:`PROPERTY_USAGE_STORAGE<class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE>`
378378
flag set will be serialized. You can add a new usage flag to a property by overriding the
379-
:ref:`_get_property_list<class_Object_method__get_property_list>`
379+
:ref:`_get_property_list<class_Object_private_method__get_property_list>`
380380
method in your class. You can also check how property usage is configured by
381381
calling ``Object._get_property_list``.
382382
See :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` for the

tutorials/math/vector_math.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ can find the position for step 2 by adding the velocity to the current position.
174174

175175
In a typical 2D game scenario, you would have a velocity in pixels per
176176
second, and multiply it by the ``delta`` parameter (time elapsed since
177-
the previous frame) from the :ref:`_process() <class_Node_method__process>`
178-
or :ref:`_physics_process() <class_Node_method__physics_process>`
177+
the previous frame) from the :ref:`_process() <class_Node_private_method__process>`
178+
or :ref:`_physics_process() <class_Node_private_method__physics_process>`
179179
callbacks.
180180

181181
Pointing toward a target

tutorials/physics/physics_introduction.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ These nodes allow you to draw the shape directly in the editor workspace.
8383
Physics process callback
8484
~~~~~~~~~~~~~~~~~~~~~~~~
8585

86-
The physics engine runs at a fixed rate (a default of 60 iterations per second). This rate
86+
The physics engine runs at a fixed rate (a default of 60 iterations per second). This rate
8787
is typically different from the frame rate which fluctuates based on what is rendered and
8888
available resources.
8989

90-
It is important that all physics related code runs at this fixed rate. Therefore Godot
90+
It is important that all physics related code runs at this fixed rate. Therefore Godot
9191
differentiates :ref:`between physics and idle processing <doc_idle_and_physics_processing>`.
92-
Code that runs each frame is called idle processing and code that runs on each physics
93-
tick is called physics processing. Godot provides two different callbacks, one for each
92+
Code that runs each frame is called idle processing and code that runs on each physics
93+
tick is called physics processing. Godot provides two different callbacks, one for each
9494
of those processing rates.
9595

96-
The physics callback, :ref:`Node._physics_process() <class_Node_method__physics_process>`,
96+
The physics callback, :ref:`Node._physics_process() <class_Node_private_method__physics_process>`,
9797
is called before each physics step. Any code that needs to access a body's properties should
9898
be run in here. This method will be passed a ``delta``
9999
parameter, which is a floating-point number equal to the time passed in
@@ -249,7 +249,7 @@ automatically be calculated by the physics engine.
249249
However, if you do wish to have some control over the body, you should take
250250
care - altering the ``position``, ``linear_velocity``, or other physics properties
251251
of a rigid body can result in unexpected behavior. If you need to alter any
252-
of the physics-related properties, you should use the :ref:`_integrate_forces() <class_RigidBody2D_method__integrate_forces>`
252+
of the physics-related properties, you should use the :ref:`_integrate_forces() <class_RigidBody2D_private_method__integrate_forces>`
253253
callback instead of ``_physics_process()``. In this callback, you have access
254254
to the body's :ref:`PhysicsDirectBodyState2D <class_PhysicsDirectBodyState2D>`,
255255
which allows for safely changing properties and synchronizing them with

tutorials/physics/ray-casting.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Accessing space
4040
Godot physics runs by default in the same thread as game logic, but may
4141
be set to run on a separate thread to work more efficiently. Due to
4242
this, the only time accessing space is safe is during the
43-
:ref:`Node._physics_process() <class_Node_method__physics_process>`
43+
:ref:`Node._physics_process() <class_Node_private_method__physics_process>`
4444
callback. Accessing it from outside this function may result in an error
4545
due to space being *locked*.
4646

@@ -158,17 +158,17 @@ with Area3D, the boolean parameter ``collide_with_areas`` must be set to ``true`
158158
.. code-tab:: gdscript GDScript
159159

160160
const RAY_LENGTH = 1000
161-
161+
162162
func _physics_process(delta):
163163
var space_state = get_world_3d().direct_space_state
164164
var cam = $Camera3D
165165
var mousepos = get_viewport().get_mouse_position()
166-
166+
167167
var origin = cam.project_ray_origin(mousepos)
168168
var end = origin + cam.project_ray_normal(mousepos) * RAY_LENGTH
169169
var query = PhysicsRayQueryParameters3D.create(origin, end)
170170
query.collide_with_areas = true
171-
171+
172172
var result = space_state.intersect_ray(query)
173173

174174
Collision exceptions
@@ -182,7 +182,7 @@ as shown in the following image:
182182
.. image:: img/raycast_falsepositive.webp
183183

184184
To avoid self-intersection, the ``intersect_ray()`` parameters object can take an
185-
array of exceptions via its ``exclude`` property. This is an example of how to use it
185+
array of exceptions via its ``exclude`` property. This is an example of how to use it
186186
from a CharacterBody2D or any other collision object node:
187187

188188
.. tabs::
@@ -231,8 +231,8 @@ member variable. The array of exceptions can be supplied as the last argument as
231231

232232
func _physics_process(delta):
233233
var space_state = get_world_2d().direct_space_state
234-
var query = PhysicsRayQueryParameters2D.create(global_position, target_position,
235-
collision_mask, [self])
234+
var query = PhysicsRayQueryParameters2D.create(global_position, target_position,
235+
collision_mask, [self])
236236
var result = space_state.intersect_ray(query)
237237

238238
.. code-tab:: csharp

tutorials/plugins/editor/3d_gizmos.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ to 3.1+, you should go with the second approach.
6666
Simple approach
6767
---------------
6868

69-
The first step is to, in our custom gizmo plugin, override the :ref:`_has_gizmo()<class_EditorNode3DGizmoPlugin_method__has_gizmo>`
69+
The first step is to, in our custom gizmo plugin, override the :ref:`_has_gizmo()<class_EditorNode3DGizmoPlugin_private_method__has_gizmo>`
7070
method so that it returns ``true`` when the node parameter is of our target type.
7171

7272
::
@@ -80,7 +80,7 @@ method so that it returns ``true`` when the node parameter is of our target type
8080

8181
# ...
8282

83-
Then we can override methods like :ref:`_redraw()<class_EditorNode3DGizmoPlugin_method__redraw>`
83+
Then we can override methods like :ref:`_redraw()<class_EditorNode3DGizmoPlugin_private_method__redraw>`
8484
or all the handle related ones.
8585

8686
::
@@ -172,7 +172,7 @@ maybe because we want to have some state stored in each gizmo or because we are
172172
an old gizmo plugin and we don't want to go through the rewriting process.
173173

174174
In these cases all we need to do is, in our new gizmo plugin, override
175-
:ref:`_create_gizmo()<class_EditorNode3DGizmoPlugin_method__create_gizmo>`, so it returns our custom gizmo implementation
175+
:ref:`_create_gizmo()<class_EditorNode3DGizmoPlugin_private_method__create_gizmo>`, so it returns our custom gizmo implementation
176176
for the Node3D nodes we want to target.
177177

178178
::

0 commit comments

Comments
 (0)