@@ -75,7 +75,7 @@ redrawn if modified:
75
75
# If the texture variable is modified externally,
76
76
# this callback is called.
77
77
texture = value # Texture was changed.
78
- update () # Update the node's visual representation .
78
+ queue_redraw () # Trigger a redraw of the node .
79
79
80
80
func _draw():
81
81
draw_texture(texture, Vector2())
@@ -95,7 +95,7 @@ redrawn if modified:
95
95
set
96
96
{
97
97
_texture = value;
98
- Update ();
98
+ QueueRedraw ();
99
99
}
100
100
}
101
101
@@ -106,7 +106,7 @@ redrawn if modified:
106
106
}
107
107
108
108
In some cases, it may be desired to draw every frame. For this,
109
- call ``update () `` from the ``_process() `` callback, like this:
109
+ call ``queue_redraw () `` from the ``_process() `` callback, like this:
110
110
111
111
.. tabs ::
112
112
.. code-tab :: gdscript GDScript
@@ -118,7 +118,7 @@ call ``update()`` from the ``_process()`` callback, like this:
118
118
pass
119
119
120
120
func _process(delta):
121
- update ()
121
+ queue_redraw ()
122
122
123
123
.. code-tab :: csharp
124
124
@@ -131,7 +131,7 @@ call ``update()`` from the ``_process()`` callback, like this:
131
131
132
132
public override void _Process(float delta)
133
133
{
134
- Update ();
134
+ QueueRedraw ();
135
135
}
136
136
}
137
137
@@ -342,7 +342,7 @@ work correctly, but the angle values will grow bigger and bigger over time until
342
342
they reach the maximum integer value Godot can manage (``2^31 - 1 ``).
343
343
When this happens, Godot may crash or produce unexpected behavior.
344
344
345
- Finally, we must not forget to call the ``update () `` function, which automatically
345
+ Finally, we must not forget to call the ``queue_redraw () `` function, which automatically
346
346
calls ``_draw() ``. This way, you can control when you want to refresh the frame.
347
347
348
348
.. tabs ::
@@ -356,7 +356,7 @@ calls ``_draw()``. This way, you can control when you want to refresh the frame.
356
356
if angle_from > 360 and angle_to > 360:
357
357
angle_from = wrapf(angle_from, 0, 360)
358
358
angle_to = wrapf(angle_to, 0, 360)
359
- update ()
359
+ queue_redraw ()
360
360
361
361
.. code-tab :: csharp
362
362
@@ -371,7 +371,7 @@ calls ``_draw()``. This way, you can control when you want to refresh the frame.
371
371
_angleFrom = Mathf.Wrap(_angleFrom, 0, 360);
372
372
_angleTo = Mathf.Wrap(_angleTo, 0, 360);
373
373
}
374
- Update ();
374
+ QueueRedraw ();
375
375
}
376
376
377
377
@@ -425,7 +425,7 @@ smaller value, which directly depends on the rendering speed.
425
425
if angle_from > 360 and angle_to > 360:
426
426
angle_from = wrapf(angle_from, 0, 360)
427
427
angle_to = wrapf(angle_to, 0, 360)
428
- update ()
428
+ queue_redraw ()
429
429
430
430
.. code-tab :: csharp
431
431
@@ -440,7 +440,7 @@ smaller value, which directly depends on the rendering speed.
440
440
_angleFrom = Wrap(_angleFrom, 0, 360);
441
441
_angleTo = Wrap(_angleTo, 0, 360);
442
442
}
443
- Update ();
443
+ QueueRedraw ();
444
444
}
445
445
446
446
0 commit comments