Files
godot-docs-l10n/classes/uk/class_animationlibrary.rst

203 lines
11 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_AnimationLibrary:
AnimationLibrary
================
**Успадковує:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Контейнер для ресурсів :ref:`Animation<class_Animation>`.
.. rst-class:: classref-introduction-group
Опис
--------
Бібліотека Анімації зберігає набір анімацій, доступних через ключі :ref:`StringName<class_StringName>`, для використання з вузлами :ref:`AnimationPlayer<class_AnimationPlayer>`.
.. rst-class:: classref-introduction-group
Посібники
------------------
- :doc:`Індекс підручника з анімації <../tutorials/animation/index>`
.. rst-class:: classref-reftable-group
Методи
------------
.. table::
:widths: auto
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_animation<class_AnimationLibrary_method_add_animation>`\ (\ name\: :ref:`StringName<class_StringName>`, animation\: :ref:`Animation<class_Animation>`\ ) |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Animation<class_Animation>` | :ref:`get_animation<class_AnimationLibrary_method_get_animation>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_animation_list<class_AnimationLibrary_method_get_animation_list>`\ (\ ) |const| |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_animation_list_size<class_AnimationLibrary_method_get_animation_list_size>`\ (\ ) |const| |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`has_animation<class_AnimationLibrary_method_has_animation>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`remove_animation<class_AnimationLibrary_method_remove_animation>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`rename_animation<class_AnimationLibrary_method_rename_animation>`\ (\ name\: :ref:`StringName<class_StringName>`, newname\: :ref:`StringName<class_StringName>`\ ) |
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Сигнали
--------------
.. _class_AnimationLibrary_signal_animation_added:
.. rst-class:: classref-signal
**animation_added**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationLibrary_signal_animation_added>`
Випромінюється, коли додається :ref:`Animation<class_Animation>`, під ключем ``name``.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_signal_animation_changed:
.. rst-class:: classref-signal
**animation_changed**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationLibrary_signal_animation_changed>`
Випромінюється, коли відбувається якась зміна в анімації, наприклад, додалася доріжка, перемістилися, або змінилися шляхи. ``name`` - це ключ анімації, яка була змінена.
Дивіться також :ref:`Resource.changed<class_Resource_signal_changed>`, для якого це діє як реле.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_signal_animation_removed:
.. rst-class:: classref-signal
**animation_removed**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationLibrary_signal_animation_removed>`
Випромінюється, коли :ref:`Animation<class_Animation>`, збережена з ключем ``name``, видаляється.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_signal_animation_renamed:
.. rst-class:: classref-signal
**animation_renamed**\ (\ name\: :ref:`StringName<class_StringName>`, to_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationLibrary_signal_animation_renamed>`
Випромінюється, коли ключ для :ref:`Animation<class_Animation>` змінюється, з ``name`` на ``to_name``.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описи методів
--------------------------
.. _class_AnimationLibrary_method_add_animation:
.. rst-class:: classref-method
:ref:`Error<enum_@GlobalScope_Error>` **add_animation**\ (\ name\: :ref:`StringName<class_StringName>`, animation\: :ref:`Animation<class_Animation>`\ ) :ref:`🔗<class_AnimationLibrary_method_add_animation>`
Додає ``animation`` до бібліотеки, доступної за ключем ``name``.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_method_get_animation:
.. rst-class:: classref-method
:ref:`Animation<class_Animation>` **get_animation**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationLibrary_method_get_animation>`
Повертає :ref:`Animation<class_Animation>` за ключем ``name``. Якщо анімації не існує, повертається ``null`` і реєструється помилка.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_method_get_animation_list:
.. rst-class:: classref-method
:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_animation_list**\ (\ ) |const| :ref:`🔗<class_AnimationLibrary_method_get_animation_list>`
Повертає ключі для :ref:`Animation<class_Animation>`\ й, що зберігає(ю)ться у бібліотеці.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_method_get_animation_list_size:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_animation_list_size**\ (\ ) |const| :ref:`🔗<class_AnimationLibrary_method_get_animation_list_size>`
Повертає кількість ключів для :ref:`Animation<class_Animation>`, що зберігається в бібліотеці.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_method_has_animation:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **has_animation**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_AnimationLibrary_method_has_animation>`
Повертає ``true``, якщо бібліотека зберігає :ref:`Animation<class_Animation>` з ключем ``name``.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_method_remove_animation:
.. rst-class:: classref-method
|void| **remove_animation**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationLibrary_method_remove_animation>`
Видаляє :ref:`Animation<class_Animation>` з ключем ``name``.
.. rst-class:: classref-item-separator
----
.. _class_AnimationLibrary_method_rename_animation:
.. rst-class:: classref-method
|void| **rename_animation**\ (\ name\: :ref:`StringName<class_StringName>`, newname\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_AnimationLibrary_method_rename_animation>`
Змінює ключ :ref:`Animation<class_Animation>`, пов'язаний з ключем ``name`` на ``newname``.
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
.. |void| replace:: :abbr:`void (Значення не повертається.)`