mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-23 15:17:21 +01:00
108 lines
5.9 KiB
ReStructuredText
108 lines
5.9 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/PropertyTweener.xml.
|
|
|
|
.. _class_PropertyTweener:
|
|
|
|
PropertyTweener
|
|
===============
|
|
|
|
**Inherits:** :ref:`Tweener<class_Tweener>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
Interpolates an :ref:`Object<class_Object>`'s property over time.
|
|
|
|
Description
|
|
-----------
|
|
|
|
``PropertyTweener`` is used to interpolate a property in an object. See :ref:`SceneTreeTween.tween_property<class_SceneTreeTween_method_tween_property>` for more usage information.
|
|
|
|
\ **Note:** :ref:`SceneTreeTween.tween_property<class_SceneTreeTween_method_tween_property>` is the only correct way to create ``PropertyTweener``. Any ``PropertyTweener`` created manually will not function correctly.
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`as_relative<class_PropertyTweener_method_as_relative>` **(** **)** |
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`from<class_PropertyTweener_method_from>` **(** :ref:`Variant<class_Variant>` value **)** |
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`from_current<class_PropertyTweener_method_from_current>` **(** **)** |
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_delay<class_PropertyTweener_method_set_delay>` **(** :ref:`float<class_float>` delay **)** |
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_ease<class_PropertyTweener_method_set_ease>` **(** :ref:`EaseType<enum_Tween_EaseType>` ease **)** |
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_trans<class_PropertyTweener_method_set_trans>` **(** :ref:`TransitionType<enum_Tween_TransitionType>` trans **)** |
|
|
+-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_PropertyTweener_method_as_relative:
|
|
|
|
- :ref:`PropertyTweener<class_PropertyTweener>` **as_relative** **(** **)**
|
|
|
|
When called, the final value will be used as a relative value instead. Example:
|
|
|
|
::
|
|
|
|
var tween = get_tree().create_tween()
|
|
tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right
|
|
|
|
----
|
|
|
|
.. _class_PropertyTweener_method_from:
|
|
|
|
- :ref:`PropertyTweener<class_PropertyTweener>` **from** **(** :ref:`Variant<class_Variant>` value **)**
|
|
|
|
Sets a custom initial value to the ``PropertyTweener``. Example:
|
|
|
|
::
|
|
|
|
var tween = get_tree().create_tween()
|
|
tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100) #this will move the node from position (100, 100) to (200, 100)
|
|
|
|
----
|
|
|
|
.. _class_PropertyTweener_method_from_current:
|
|
|
|
- :ref:`PropertyTweener<class_PropertyTweener>` **from_current** **(** **)**
|
|
|
|
Makes the ``PropertyTweener`` use the current property value (i.e. at the time of creating this ``PropertyTweener``) as a starting point. This is equivalent of using :ref:`from<class_PropertyTweener_method_from>` with the current value. These two calls will do the same:
|
|
|
|
::
|
|
|
|
tween.tween_property(self, "position", Vector2(200, 100), 1).from(position)
|
|
tween.tween_property(self, "position", Vector2(200, 100), 1).from_current()
|
|
|
|
----
|
|
|
|
.. _class_PropertyTweener_method_set_delay:
|
|
|
|
- :ref:`PropertyTweener<class_PropertyTweener>` **set_delay** **(** :ref:`float<class_float>` delay **)**
|
|
|
|
Sets the time in seconds after which the ``PropertyTweener`` will start interpolating. By default there's no delay.
|
|
|
|
----
|
|
|
|
.. _class_PropertyTweener_method_set_ease:
|
|
|
|
- :ref:`PropertyTweener<class_PropertyTweener>` **set_ease** **(** :ref:`EaseType<enum_Tween_EaseType>` ease **)**
|
|
|
|
Sets the type of used easing from :ref:`EaseType<enum_Tween_EaseType>`. If not set, the default easing is used from the :ref:`SceneTreeTween<class_SceneTreeTween>` that contains this Tweener.
|
|
|
|
----
|
|
|
|
.. _class_PropertyTweener_method_set_trans:
|
|
|
|
- :ref:`PropertyTweener<class_PropertyTweener>` **set_trans** **(** :ref:`TransitionType<enum_Tween_TransitionType>` trans **)**
|
|
|
|
Sets the type of used transition from :ref:`TransitionType<enum_Tween_TransitionType>`. If not set, the default transition is used from the :ref:`SceneTreeTween<class_SceneTreeTween>` that contains this Tweener.
|
|
|
|
.. |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.)`
|