Files
godot-docs-l10n/classes/es/class_animatedsprite.rst
Rémi Verschelde cf78697eea Add localized class reference as pre-generated RST files
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`
2021-12-21 16:07:55 +01:00

242 lines
9.3 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 AnimatedSprite.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_AnimatedSprite:
AnimatedSprite
==============
**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
Nodo Sprite que puede usar múltiples texturas para la animación.
Descripción
----------------------
Animations are created using a :ref:`SpriteFrames<class_SpriteFrames>` resource, which can be configured in the editor via the SpriteFrames panel.
\ **Note:** You can associate a set of normal maps by creating additional :ref:`SpriteFrames<class_SpriteFrames>` resources with a ``_normal`` suffix. For example, having 2 :ref:`SpriteFrames<class_SpriteFrames>` resources ``run`` and ``run_normal`` will make it so the ``run`` animation uses the normal map.
Tutoriales
--------------------
- :doc:`2D Sprite animation <../tutorials/2d/2d_sprite_animation>`
- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__
Propiedades
----------------------
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`String<class_String>` | :ref:`animation<class_AnimatedSprite_property_animation>` | ``"default"`` |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`bool<class_bool>` | :ref:`centered<class_AnimatedSprite_property_centered>` | ``true`` |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`bool<class_bool>` | :ref:`flip_h<class_AnimatedSprite_property_flip_h>` | ``false`` |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`bool<class_bool>` | :ref:`flip_v<class_AnimatedSprite_property_flip_v>` | ``false`` |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`int<class_int>` | :ref:`frame<class_AnimatedSprite_property_frame>` | ``0`` |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`SpriteFrames<class_SpriteFrames>` | :ref:`frames<class_AnimatedSprite_property_frames>` | |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`offset<class_AnimatedSprite_property_offset>` | ``Vector2( 0, 0 )`` |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`bool<class_bool>` | :ref:`playing<class_AnimatedSprite_property_playing>` | ``false`` |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
| :ref:`float<class_float>` | :ref:`speed_scale<class_AnimatedSprite_property_speed_scale>` | ``1.0`` |
+-----------------------------------------+---------------------------------------------------------------+---------------------+
Métodos
--------------
+------+----------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`play<class_AnimatedSprite_method_play>` **(** :ref:`String<class_String>` anim="", :ref:`bool<class_bool>` backwards=false **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`stop<class_AnimatedSprite_method_stop>` **(** **)** |
+------+----------------------------------------------------------------------------------------------------------------------------------------+
Señales
--------------
.. _class_AnimatedSprite_signal_animation_finished:
- **animation_finished** **(** **)**
Se emite cuando la animación termina (cuando reproduce el último fotograma). Si la animación está en bucle, esta señal se emite cada vez que se reproduce el último fotograma.
----
.. _class_AnimatedSprite_signal_frame_changed:
- **frame_changed** **(** **)**
Emitido cuando :ref:`frame<class_AnimatedSprite_property_frame>` cambió.
Descripciones de Propiedades
--------------------------------------------------------
.. _class_AnimatedSprite_property_animation:
- :ref:`String<class_String>` **animation**
+-----------+----------------------+
| *Default* | ``"default"`` |
+-----------+----------------------+
| *Setter* | set_animation(value) |
+-----------+----------------------+
| *Getter* | get_animation() |
+-----------+----------------------+
La animación actual del recurso ``frames``. Si este valor cambia, el contador ``frame`` se reinicia.
----
.. _class_AnimatedSprite_property_centered:
- :ref:`bool<class_bool>` **centered**
+-----------+---------------------+
| *Default* | ``true`` |
+-----------+---------------------+
| *Setter* | set_centered(value) |
+-----------+---------------------+
| *Getter* | is_centered() |
+-----------+---------------------+
Si ``true``, la textura se centrará.
----
.. _class_AnimatedSprite_property_flip_h:
- :ref:`bool<class_bool>` **flip_h**
+-----------+-------------------+
| *Default* | ``false`` |
+-----------+-------------------+
| *Setter* | set_flip_h(value) |
+-----------+-------------------+
| *Getter* | is_flipped_h() |
+-----------+-------------------+
Si ``true``, la textura se voltea horizontalmente.
----
.. _class_AnimatedSprite_property_flip_v:
- :ref:`bool<class_bool>` **flip_v**
+-----------+-------------------+
| *Default* | ``false`` |
+-----------+-------------------+
| *Setter* | set_flip_v(value) |
+-----------+-------------------+
| *Getter* | is_flipped_v() |
+-----------+-------------------+
Si ``true``, la textura se voltea verticalmente.
----
.. _class_AnimatedSprite_property_frame:
- :ref:`int<class_int>` **frame**
+-----------+------------------+
| *Default* | ``0`` |
+-----------+------------------+
| *Setter* | set_frame(value) |
+-----------+------------------+
| *Getter* | get_frame() |
+-----------+------------------+
El índice del cuadro de animación mostrado.
----
.. _class_AnimatedSprite_property_frames:
- :ref:`SpriteFrames<class_SpriteFrames>` **frames**
+----------+--------------------------+
| *Setter* | set_sprite_frames(value) |
+----------+--------------------------+
| *Getter* | get_sprite_frames() |
+----------+--------------------------+
El recurso :ref:`SpriteFrames<class_SpriteFrames>` que contiene la(s) animación(es).
----
.. _class_AnimatedSprite_property_offset:
- :ref:`Vector2<class_Vector2>` **offset**
+-----------+---------------------+
| *Default* | ``Vector2( 0, 0 )`` |
+-----------+---------------------+
| *Setter* | set_offset(value) |
+-----------+---------------------+
| *Getter* | get_offset() |
+-----------+---------------------+
El desplazamiento al dibujar de la textura.
----
.. _class_AnimatedSprite_property_playing:
- :ref:`bool<class_bool>` **playing**
+-----------+--------------------+
| *Default* | ``false`` |
+-----------+--------------------+
| *Setter* | set_playing(value) |
+-----------+--------------------+
| *Getter* | is_playing() |
+-----------+--------------------+
Si ``true``, la :ref:`animation<class_AnimatedSprite_property_animation>` se está reproduciendo actualmente.
----
.. _class_AnimatedSprite_property_speed_scale:
- :ref:`float<class_float>` **speed_scale**
+-----------+------------------------+
| *Default* | ``1.0`` |
+-----------+------------------------+
| *Setter* | set_speed_scale(value) |
+-----------+------------------------+
| *Getter* | get_speed_scale() |
+-----------+------------------------+
La velocidad de la animación se multiplica por este valor.
Descripciones de Métodos
------------------------------------------------
.. _class_AnimatedSprite_method_play:
- void **play** **(** :ref:`String<class_String>` anim="", :ref:`bool<class_bool>` backwards=false **)**
Reproduce la animación llamada ``anim``. Si no se proporciona ``anim``, se reproduce la animación actual. Si ``backwards`` es ``true``, la animación se reproduce al revés.
----
.. _class_AnimatedSprite_method_stop:
- void **stop** **(** **)**
Detiene la animación actual (no reinicia el contador de fotogramas).
.. |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.)`