mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
89 lines
4.3 KiB
ReStructuredText
89 lines
4.3 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_MethodTweener:
|
|
|
|
MethodTweener
|
|
=============
|
|
|
|
**继承:** :ref:`Tweener<class_Tweener>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
对抽象值进行插值,并将其提供给一个持续调用的方法。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
描述
|
|
----
|
|
|
|
**MethodTweener** 类似于 :ref:`CallbackTweener<class_CallbackTweener>` 和 :ref:`PropertyTweener<class_PropertyTweener>` 的组合,会将插值后的值作为调用方法时的参数。更多用法信息请参阅 :ref:`Tween.tween_method()<class_Tween_method_tween_method>`\ 。
|
|
|
|
如果回调的目标对象被释放,该补间将自动完成。
|
|
|
|
\ **注意:**\ 创建 **MethodTweener** 的唯一正确方法是 :ref:`Tween.tween_method()<class_Tween_method_tween_method>`\ 。任何手动创建的 **MethodTweener** 都无法正常工作。
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
方法
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_delay<class_MethodTweener_method_set_delay>`\ (\ delay\: :ref:`float<class_float>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_ease<class_MethodTweener_method_set_ease>`\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_trans<class_MethodTweener_method_set_trans>`\ (\ trans\: :ref:`TransitionType<enum_Tween_TransitionType>`\ ) |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
方法说明
|
|
--------
|
|
|
|
.. _class_MethodTweener_method_set_delay:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`MethodTweener<class_MethodTweener>` **set_delay**\ (\ delay\: :ref:`float<class_float>`\ ) :ref:`🔗<class_MethodTweener_method_set_delay>`
|
|
|
|
设置该 **MethodTweener** 开始插值的时间,单位为秒。默认无延迟。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_MethodTweener_method_set_ease:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`MethodTweener<class_MethodTweener>` **set_ease**\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) :ref:`🔗<class_MethodTweener_method_set_ease>`
|
|
|
|
设置所使用的缓动类型 :ref:`EaseType<enum_Tween_EaseType>`\ 。如果没有设置,则使用包含这个 Tweener 的 :ref:`Tween<class_Tween>` 的默认缓动类型。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_MethodTweener_method_set_trans:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`MethodTweener<class_MethodTweener>` **set_trans**\ (\ trans\: :ref:`TransitionType<enum_Tween_TransitionType>`\ ) :ref:`🔗<class_MethodTweener_method_set_trans>`
|
|
|
|
设置所使用的过渡类型 :ref:`TransitionType<enum_Tween_TransitionType>`\ 。如果没有设置,则使用包含这个 Tweener 的 :ref:`Tween<class_Tween>` 的默认过渡类型。
|
|
|
|
.. |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 (无返回值。)`
|