Files
godot-docs-l10n/classes/ru/class_skeletonmodificationstack2d.rst

249 lines
16 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_SkeletonModificationStack2D:
SkeletonModificationStack2D
===========================
**Экспериментальное:** This class may be changed or removed in future versions.
**Наследует:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
Ресурс, содержащий стек :ref:`SkeletonModification2D<class_SkeletonModification2D>`.
.. rst-class:: classref-introduction-group
Описание
----------------
Этот ресурс используется Скелетом и содержит стек :ref:`SkeletonModification2D<class_SkeletonModification2D>`.
Он управляет порядком модификаций и тем, как они применяются. Порядок модификаций особенно важен для настроек IK всего тела, так как вам нужно выполнить модификации в правильном порядке, чтобы получить желаемые результаты. Например, вы хотите выполнить модификацию позвоночника *перед* руками гуманоидного скелета.
Этот ресурс также управляет тем, насколько сильно все модификации применяются к :ref:`Skeleton2D<class_Skeleton2D>`.
.. rst-class:: classref-reftable-group
Свойства
----------------
.. table::
:widths: auto
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`enabled<class_SkeletonModificationStack2D_property_enabled>` | ``false`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`modification_count<class_SkeletonModificationStack2D_property_modification_count>` | ``0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`strength<class_SkeletonModificationStack2D_property_strength>` | ``1.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
.. rst-class:: classref-reftable-group
Методы
------------
.. table::
:widths: auto
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_modification<class_SkeletonModificationStack2D_method_add_modification>`\ (\ modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`delete_modification<class_SkeletonModificationStack2D_method_delete_modification>`\ (\ mod_idx\: :ref:`int<class_int>`\ ) |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`enable_all_modifications<class_SkeletonModificationStack2D_method_enable_all_modifications>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`execute<class_SkeletonModificationStack2D_method_execute>`\ (\ delta\: :ref:`float<class_float>`, execution_mode\: :ref:`int<class_int>`\ ) |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`get_is_setup<class_SkeletonModificationStack2D_method_get_is_setup>`\ (\ ) |const| |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`SkeletonModification2D<class_SkeletonModification2D>` | :ref:`get_modification<class_SkeletonModificationStack2D_method_get_modification>`\ (\ mod_idx\: :ref:`int<class_int>`\ ) |const| |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Skeleton2D<class_Skeleton2D>` | :ref:`get_skeleton<class_SkeletonModificationStack2D_method_get_skeleton>`\ (\ ) |const| |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_modification<class_SkeletonModificationStack2D_method_set_modification>`\ (\ mod_idx\: :ref:`int<class_int>`, modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`setup<class_SkeletonModificationStack2D_method_setup>`\ (\ ) |
+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описания свойств
--------------------------------
.. _class_SkeletonModificationStack2D_property_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **enabled** = ``false`` :ref:`🔗<class_SkeletonModificationStack2D_property_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_enabled**\ (\ )
Если ``true``, то будут вызваны модификации в стеке. Это обрабатывается автоматически через узел :ref:`Skeleton2D<class_Skeleton2D>`.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_property_modification_count:
.. rst-class:: classref-property
:ref:`int<class_int>` **modification_count** = ``0`` :ref:`🔗<class_SkeletonModificationStack2D_property_modification_count>`
.. rst-class:: classref-property-setget
- |void| **set_modification_count**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_modification_count**\ (\ )
Количество модификаций в стеке.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_property_strength:
.. rst-class:: classref-property
:ref:`float<class_float>` **strength** = ``1.0`` :ref:`🔗<class_SkeletonModificationStack2D_property_strength>`
.. rst-class:: classref-property-setget
- |void| **set_strength**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_strength**\ (\ )
Сила интерполяции модификаций в стеке. Значение ``0`` сделает так, что модификации не будут применены, сила ``0.5`` будет применена наполовину, а сила ``1`` позволит модификациям быть примененными полностью и переопределить позы :ref:`Skeleton2D<class_Skeleton2D>` :ref:`Bone2D<class_Bone2D>`.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Описания метода
------------------------------
.. _class_SkeletonModificationStack2D_method_add_modification:
.. rst-class:: classref-method
|void| **add_modification**\ (\ modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_add_modification>`
Добавляет переданный :ref:`SkeletonModification2D<class_SkeletonModification2D>` в стек.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_method_delete_modification:
.. rst-class:: classref-method
|void| **delete_modification**\ (\ mod_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_delete_modification>`
Удаляет :ref:`SkeletonModification2D<class_SkeletonModification2D>` в позиции индекса ``mod_idx``, если он существует.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_method_enable_all_modifications:
.. rst-class:: classref-method
|void| **enable_all_modifications**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_enable_all_modifications>`
Включает все :ref:`SkeletonModification2D<class_SkeletonModification2D>` в стеке.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_method_execute:
.. rst-class:: classref-method
|void| **execute**\ (\ delta\: :ref:`float<class_float>`, execution_mode\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_execute>`
Выполняет все :ref:`SkeletonModification2D<class_SkeletonModification2D>` в стеке, которые используют тот же режим выполнения, что и переданный ``execution_mode``, начиная с индекса ``0`` до :ref:`modification_count<class_SkeletonModificationStack2D_property_modification_count>`.
\ **Примечание:** Порядок модификаций может иметь значение в зависимости от модификаций. Например, модификации позвоночника должны выполняться до модификаций рук, чтобы получить правильные результаты.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_method_get_is_setup:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **get_is_setup**\ (\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_is_setup>`
Возвращает логическое значение, указывающее, настроен ли стек модификации и может ли он быть выполнен.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_method_get_modification:
.. rst-class:: classref-method
:ref:`SkeletonModification2D<class_SkeletonModification2D>` **get_modification**\ (\ mod_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_modification>`
Возвращает :ref:`SkeletonModification2D<class_SkeletonModification2D>` по переданному индексу ``mod_idx``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_method_get_skeleton:
.. rst-class:: classref-method
:ref:`Skeleton2D<class_Skeleton2D>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_skeleton>`
Возвращает узел :ref:`Skeleton2D<class_Skeleton2D>`, к которому привязан SkeletonModificationStack2D.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_method_set_modification:
.. rst-class:: classref-method
|void| **set_modification**\ (\ mod_idx\: :ref:`int<class_int>`, modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_set_modification>`
Устанавливает модификацию в ``mod_idx`` на переданную модификацию ``modification``.
.. rst-class:: classref-item-separator
----
.. _class_SkeletonModificationStack2D_method_setup:
.. rst-class:: classref-method
|void| **setup**\ (\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_setup>`
Настраивает стек модификации, чтобы он мог выполняться. Эта функция должна вызываться :ref:`Skeleton2D<class_Skeleton2D>` и не должна вызываться вручную, если вы не знаете, что делаете.
.. |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 (Нет возвращаемого значения.)`