mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
174 lines
7.0 KiB
ReStructuredText
174 lines
7.0 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RemoteTransform2D.xml.
|
|
|
|
.. _class_RemoteTransform2D:
|
|
|
|
RemoteTransform2D
|
|
=================
|
|
|
|
**继承:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
RemoteTransform2D 会将自己的 :ref:`Transform2D<class_Transform2D>` 推送到场景中另一个派生自 :ref:`CanvasItem<class_CanvasItem>` 的节点。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
描述
|
|
----
|
|
|
|
RemoteTransform2D 会将自己的 :ref:`Transform2D<class_Transform2D>` 推送到场景中另一个派生自 :ref:`CanvasItem<class_CanvasItem>` 的节点(称为远程节点)。
|
|
|
|
可以设置更新另一个节点的位置、旋转和/或比例。可以使用全局坐标,也可以使用局部坐标。
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
属性
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------------+----------------------------------------------------------------------------------------+------------------+
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`remote_path<class_RemoteTransform2D_property_remote_path>` | ``NodePath("")`` |
|
|
+---------------------------------+----------------------------------------------------------------------------------------+------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`update_position<class_RemoteTransform2D_property_update_position>` | ``true`` |
|
|
+---------------------------------+----------------------------------------------------------------------------------------+------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`update_rotation<class_RemoteTransform2D_property_update_rotation>` | ``true`` |
|
|
+---------------------------------+----------------------------------------------------------------------------------------+------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`update_scale<class_RemoteTransform2D_property_update_scale>` | ``true`` |
|
|
+---------------------------------+----------------------------------------------------------------------------------------+------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`use_global_coordinates<class_RemoteTransform2D_property_use_global_coordinates>` | ``true`` |
|
|
+---------------------------------+----------------------------------------------------------------------------------------+------------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
方法
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+--------+------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`force_update_cache<class_RemoteTransform2D_method_force_update_cache>`\ (\ ) |
|
|
+--------+------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
属性说明
|
|
--------
|
|
|
|
.. _class_RemoteTransform2D_property_remote_path:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`NodePath<class_NodePath>` **remote_path** = ``NodePath("")`` :ref:`🔗<class_RemoteTransform2D_property_remote_path>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_remote_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
|
|
- :ref:`NodePath<class_NodePath>` **get_remote_node**\ (\ )
|
|
|
|
到远程节点的 :ref:`NodePath<class_NodePath>`\ ,相对于 RemoteTransform2D 在场景中的位置。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RemoteTransform2D_property_update_position:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **update_position** = ``true`` :ref:`🔗<class_RemoteTransform2D_property_update_position>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_update_position**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_update_position**\ (\ )
|
|
|
|
如果为 ``true``\ ,则更新远程节点的位置。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RemoteTransform2D_property_update_rotation:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **update_rotation** = ``true`` :ref:`🔗<class_RemoteTransform2D_property_update_rotation>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_update_rotation**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_update_rotation**\ (\ )
|
|
|
|
如果为 ``true``\ ,则更新远程节点的旋转。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RemoteTransform2D_property_update_scale:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **update_scale** = ``true`` :ref:`🔗<class_RemoteTransform2D_property_update_scale>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_update_scale**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_update_scale**\ (\ )
|
|
|
|
如果为 ``true``\ ,则更新远程节点的比例。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RemoteTransform2D_property_use_global_coordinates:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **use_global_coordinates** = ``true`` :ref:`🔗<class_RemoteTransform2D_property_use_global_coordinates>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_use_global_coordinates**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_bool>` **get_use_global_coordinates**\ (\ )
|
|
|
|
如果为 ``true``\ ,则使用全局坐标。如果 ``false``\ ,则使用本地坐标。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
方法说明
|
|
--------
|
|
|
|
.. _class_RemoteTransform2D_method_force_update_cache:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **force_update_cache**\ (\ ) :ref:`🔗<class_RemoteTransform2D_method_force_update_cache>`
|
|
|
|
**RemoteTransform2D** 缓存了远程节点。如果远程节点消失了,它可能不会通知;\ :ref:`force_update_cache()<class_RemoteTransform2D_method_force_update_cache>` 强制它再次更新缓存。
|
|
|
|
.. |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 (无返回值。)`
|