mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
Currently including `zh_CN` and `es` which both have very high completion ratios. Others will be added once they reach a significant percentage too. These RST files will be used by godot-docs in place of its `classes` folder after we sync with https://github.com/godotengine/godot-docs/pull/5458. The update workflow is manual for now (example for `zh_CN`): - Build `godotengine/godot` in the branch we currently track (now `3.x`) - Run `godot --doctool -l zh_CN` - Run `cd doc && make rst LANGARG=zh_CN` - Copy `doc/_build/rst/*` to `classes/zh_CN/` here - Make sure to have `classes/zh_CN/index.rst` copied from `docs/classes`
140 lines
8.0 KiB
ReStructuredText
140 lines
8.0 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the ParallaxBackground.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_ParallaxBackground:
|
|
|
|
ParallaxBackground
|
|
==================
|
|
|
|
**Inherits:** :ref:`CanvasLayer<class_CanvasLayer>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
Un nodo usado para crear un fondo de desplazamiento de paralaje.
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
Un ParallaxBackground utiliza uno o más nodos hijos :ref:`ParallaxLayer<class_ParallaxLayer>` para crear un efecto de paralaje. Cada :ref:`ParallaxLayer<class_ParallaxLayer>` puede moverse a una velocidad diferente usando el :ref:`ParallaxLayer.motion_offset<class_ParallaxLayer_property_motion_offset>`. Esto crea una ilusión de profundidad en un juego 2D. Si no se usa con una :ref:`Camera2D<class_Camera2D>`, debes calcular manualmente el :ref:`scroll_offset<class_ParallaxBackground_property_scroll_offset>`.
|
|
|
|
Propiedades
|
|
----------------------
|
|
|
|
+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | layer | ``-100`` (overrides :ref:`CanvasLayer<class_CanvasLayer_property_layer>`) |
|
|
+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`scroll_base_offset<class_ParallaxBackground_property_scroll_base_offset>` | ``Vector2( 0, 0 )`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`scroll_base_scale<class_ParallaxBackground_property_scroll_base_scale>` | ``Vector2( 1, 1 )`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`scroll_ignore_camera_zoom<class_ParallaxBackground_property_scroll_ignore_camera_zoom>` | ``false`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`scroll_limit_begin<class_ParallaxBackground_property_scroll_limit_begin>` | ``Vector2( 0, 0 )`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`scroll_limit_end<class_ParallaxBackground_property_scroll_limit_end>` | ``Vector2( 0, 0 )`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`scroll_offset<class_ParallaxBackground_property_scroll_offset>` | ``Vector2( 0, 0 )`` |
|
|
+-------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
|
|
|
|
Descripciones de Propiedades
|
|
--------------------------------------------------------
|
|
|
|
.. _class_ParallaxBackground_property_scroll_base_offset:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **scroll_base_offset**
|
|
|
|
+-----------+-------------------------------+
|
|
| *Default* | ``Vector2( 0, 0 )`` |
|
|
+-----------+-------------------------------+
|
|
| *Setter* | set_scroll_base_offset(value) |
|
|
+-----------+-------------------------------+
|
|
| *Getter* | get_scroll_base_offset() |
|
|
+-----------+-------------------------------+
|
|
|
|
El dezplazamiento de la posición base para todos los :ref:`ParallaxLayer<class_ParallaxLayer>` hijos.
|
|
|
|
----
|
|
|
|
.. _class_ParallaxBackground_property_scroll_base_scale:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **scroll_base_scale**
|
|
|
|
+-----------+------------------------------+
|
|
| *Default* | ``Vector2( 1, 1 )`` |
|
|
+-----------+------------------------------+
|
|
| *Setter* | set_scroll_base_scale(value) |
|
|
+-----------+------------------------------+
|
|
| *Getter* | get_scroll_base_scale() |
|
|
+-----------+------------------------------+
|
|
|
|
La escala de movimiento base para todos los :ref:`ParallaxLayer<class_ParallaxLayer>` hijos.
|
|
|
|
----
|
|
|
|
.. _class_ParallaxBackground_property_scroll_ignore_camera_zoom:
|
|
|
|
- :ref:`bool<class_bool>` **scroll_ignore_camera_zoom**
|
|
|
|
+-----------+-------------------------------+
|
|
| *Default* | ``false`` |
|
|
+-----------+-------------------------------+
|
|
| *Setter* | set_ignore_camera_zoom(value) |
|
|
+-----------+-------------------------------+
|
|
| *Getter* | is_ignore_camera_zoom() |
|
|
+-----------+-------------------------------+
|
|
|
|
Si ``true``, los elementos en el :ref:`ParallaxLayer<class_ParallaxLayer>` hijo no se ven afectados por el nivel de zoom de la cámara.
|
|
|
|
----
|
|
|
|
.. _class_ParallaxBackground_property_scroll_limit_begin:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **scroll_limit_begin**
|
|
|
|
+-----------+------------------------+
|
|
| *Default* | ``Vector2( 0, 0 )`` |
|
|
+-----------+------------------------+
|
|
| *Setter* | set_limit_begin(value) |
|
|
+-----------+------------------------+
|
|
| *Getter* | get_limit_begin() |
|
|
+-----------+------------------------+
|
|
|
|
Límite de la parte superior izquierda para que comience el scrolling. Si la cámara está fuera de este límite, el fondo parará el scrolling. Debe ser inferior a :ref:`scroll_limit_end<class_ParallaxBackground_property_scroll_limit_end>` para que funcione.
|
|
|
|
----
|
|
|
|
.. _class_ParallaxBackground_property_scroll_limit_end:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **scroll_limit_end**
|
|
|
|
+-----------+----------------------+
|
|
| *Default* | ``Vector2( 0, 0 )`` |
|
|
+-----------+----------------------+
|
|
| *Setter* | set_limit_end(value) |
|
|
+-----------+----------------------+
|
|
| *Getter* | get_limit_end() |
|
|
+-----------+----------------------+
|
|
|
|
Límites inferiores de la derecha para el scrolling finalice. Si la cámara está fuera de este límite, el fondo dejará de parará el scrolling. Debe ser más alto que :ref:`scroll_limit_begin<class_ParallaxBackground_property_scroll_limit_begin>` para que funcione.
|
|
|
|
----
|
|
|
|
.. _class_ParallaxBackground_property_scroll_offset:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **scroll_offset**
|
|
|
|
+-----------+--------------------------+
|
|
| *Default* | ``Vector2( 0, 0 )`` |
|
|
+-----------+--------------------------+
|
|
| *Setter* | set_scroll_offset(value) |
|
|
+-----------+--------------------------+
|
|
| *Getter* | get_scroll_offset() |
|
|
+-----------+--------------------------+
|
|
|
|
El valor de scroll del Fondo de paralaje. Se calcula automáticamente cuando se usa una :ref:`Camera2D<class_Camera2D>`, pero puede usarse para manejar manualmente el scrolling cuando no hay ninguna cámara presente.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|