mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
247 lines
12 KiB
ReStructuredText
247 lines
12 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_AnimationNodeAnimation:
|
|
|
|
AnimationNodeAnimation
|
|
======================
|
|
|
|
**Eredita:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Un'animazione d'ingresso per un :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descrizione
|
|
----------------------
|
|
|
|
Una risorsa da aggiungere a un :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. Ha una sola porta d'uscita che usa la proprietà :ref:`animation<class_AnimationNodeAnimation_property_animation>`. Usata come ingresso per :ref:`AnimationNode<class_AnimationNode>` che fondono le animazioni insieme.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutorial
|
|
----------------
|
|
|
|
- :doc:`Utilizzare l'AnimationTree <../tutorials/animation/animation_tree>`
|
|
|
|
- `Demo di gioco piattaforme 3D <https://godotengine.org/asset-library/asset/2748>`__
|
|
|
|
- `Demo di sparatutto in terza persona (TPS) <https://godotengine.org/asset-library/asset/2710>`__
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Proprietà
|
|
------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`advance_on_start<class_AnimationNodeAnimation_property_advance_on_start>` | ``false`` |
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`StringName<class_StringName>` | :ref:`animation<class_AnimationNodeAnimation_property_animation>` | ``&""`` |
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`LoopMode<enum_Animation_LoopMode>` | :ref:`loop_mode<class_AnimationNodeAnimation_property_loop_mode>` | |
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` | :ref:`play_mode<class_AnimationNodeAnimation_property_play_mode>` | ``0`` |
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`start_offset<class_AnimationNodeAnimation_property_start_offset>` | |
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`stretch_time_scale<class_AnimationNodeAnimation_property_stretch_time_scale>` | |
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`float<class_float>` | :ref:`timeline_length<class_AnimationNodeAnimation_property_timeline_length>` | |
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
| :ref:`bool<class_bool>` | :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` | ``false`` |
|
|
+-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerazioni
|
|
------------------------
|
|
|
|
.. _enum_AnimationNodeAnimation_PlayMode:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **PlayMode**: :ref:`🔗<enum_AnimationNodeAnimation_PlayMode>`
|
|
|
|
.. _class_AnimationNodeAnimation_constant_PLAY_MODE_FORWARD:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **PLAY_MODE_FORWARD** = ``0``
|
|
|
|
Riproduce l'animazione in avanti.
|
|
|
|
.. _class_AnimationNodeAnimation_constant_PLAY_MODE_BACKWARD:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **PLAY_MODE_BACKWARD** = ``1``
|
|
|
|
Riproduce l'animazione all'indietro.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descrizioni delle proprietà
|
|
------------------------------------------------------
|
|
|
|
.. _class_AnimationNodeAnimation_property_advance_on_start:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **advance_on_start** = ``false`` :ref:`🔗<class_AnimationNodeAnimation_property_advance_on_start>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_advance_on_start**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_advance_on_start**\ (\ )
|
|
|
|
Se ``true``, quando si riceve una richiesta di riprodurre un'animazione dall'inizio, il primo fotogramma non verrà disegnato, ma solo elaborato, e la riproduzione inizierà dal fotogramma successivo.
|
|
|
|
Vedi anche le note di :ref:`AnimationPlayer.play()<class_AnimationPlayer_method_play>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeAnimation_property_animation:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`StringName<class_StringName>` **animation** = ``&""`` :ref:`🔗<class_AnimationNodeAnimation_property_animation>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_animation**\ (\ value\: :ref:`StringName<class_StringName>`\ )
|
|
- :ref:`StringName<class_StringName>` **get_animation**\ (\ )
|
|
|
|
Animazione da usare come uscita. È una delle animazioni fornite da :ref:`AnimationTree.anim_player<class_AnimationTree_property_anim_player>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeAnimation_property_loop_mode:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`LoopMode<enum_Animation_LoopMode>` **loop_mode** :ref:`🔗<class_AnimationNodeAnimation_property_loop_mode>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode<enum_Animation_LoopMode>`\ )
|
|
- :ref:`LoopMode<enum_Animation_LoopMode>` **get_loop_mode**\ (\ )
|
|
|
|
Se :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` è ``true``, sovrascrive le impostazioni del ciclo della risorsa :ref:`Animation<class_Animation>` originale con il valore.
|
|
|
|
\ **Nota:** Se :ref:`Animation.loop_mode<class_Animation_property_loop_mode>` non è impostato per ripetersi, l'opzione :ref:`Animation.track_set_interpolation_loop_wrap()<class_Animation_method_track_set_interpolation_loop_wrap>` non sarà rispettata. Se non riesci a ottenere il comportamento previsto, considera di duplicare la risorsa :ref:`Animation<class_Animation>` e di modificare le impostazioni di ripetizione.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeAnimation_property_play_mode:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **play_mode** = ``0`` :ref:`🔗<class_AnimationNodeAnimation_property_play_mode>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_play_mode**\ (\ value\: :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>`\ )
|
|
- :ref:`PlayMode<enum_AnimationNodeAnimation_PlayMode>` **get_play_mode**\ (\ )
|
|
|
|
Restituisce la direzione di riproduzione dell'animazione.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeAnimation_property_start_offset:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **start_offset** :ref:`🔗<class_AnimationNodeAnimation_property_start_offset>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_start_offset**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_start_offset**\ (\ )
|
|
|
|
Se :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` è ``true``, sposta la posizione iniziale dell'animazione.
|
|
|
|
Questa funzione è utile per stabilire quale piede deve camminare per primo nelle animazioni di camminata in 3D.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeAnimation_property_stretch_time_scale:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **stretch_time_scale** :ref:`🔗<class_AnimationNodeAnimation_property_stretch_time_scale>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_stretch_time_scale**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_stretching_time_scale**\ (\ )
|
|
|
|
Se ``true``, ridimensiona il tempo in modo che la lunghezza specificata in :ref:`timeline_length<class_AnimationNodeAnimation_property_timeline_length>` sia un solo ciclo.
|
|
|
|
Questa funzione è utile per abbinare i periodi delle animazioni di camminata e corsa.
|
|
|
|
Se ``false``, la lunghezza dell'animazione originale è rispettata. Se si imposta il ciclo su :ref:`loop_mode<class_AnimationNodeAnimation_property_loop_mode>`, l'animazione sarà ripetuta in :ref:`timeline_length<class_AnimationNodeAnimation_property_timeline_length>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeAnimation_property_timeline_length:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **timeline_length** :ref:`🔗<class_AnimationNodeAnimation_property_timeline_length>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_timeline_length**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_timeline_length**\ (\ )
|
|
|
|
Se :ref:`use_custom_timeline<class_AnimationNodeAnimation_property_use_custom_timeline>` è ``true``, sposta la posizione iniziale dell'animazione.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_AnimationNodeAnimation_property_use_custom_timeline:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **use_custom_timeline** = ``false`` :ref:`🔗<class_AnimationNodeAnimation_property_use_custom_timeline>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_use_custom_timeline**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **is_using_custom_timeline**\ (\ )
|
|
|
|
Se ``true``, l':ref:`AnimationNode<class_AnimationNode>` fornisce un'animazione basata sulla risorsa :ref:`Animation<class_Animation>` con alcuni parametri aggiustati.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)`
|
|
.. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)`
|
|
.. |void| replace:: :abbr:`void (Nessun valore restituito.)`
|