12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- :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/ParallaxLayer.xml.
- .. _class_ParallaxLayer:
- ParallaxLayer
- =============
- **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- A parallax scrolling layer to be used with :ref:`ParallaxBackground<class_ParallaxBackground>`.
- Description
- -----------
- A ParallaxLayer must be the child of a :ref:`ParallaxBackground<class_ParallaxBackground>` node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the :ref:`ParallaxBackground.scroll_offset<class_ParallaxBackground_property_scroll_offset>` value.
- This node's children will be affected by its scroll offset.
- \ **Note:** Any changes to this node's position and scale made after it enters the scene will be ignored.
- Properties
- ----------
- +-------------------------------+------------------------------------------------------------------------+-------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`motion_mirroring<class_ParallaxLayer_property_motion_mirroring>` | ``Vector2(0, 0)`` |
- +-------------------------------+------------------------------------------------------------------------+-------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`motion_offset<class_ParallaxLayer_property_motion_offset>` | ``Vector2(0, 0)`` |
- +-------------------------------+------------------------------------------------------------------------+-------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`motion_scale<class_ParallaxLayer_property_motion_scale>` | ``Vector2(1, 1)`` |
- +-------------------------------+------------------------------------------------------------------------+-------------------+
- Property Descriptions
- ---------------------
- .. _class_ParallaxLayer_property_motion_mirroring:
- - :ref:`Vector2<class_Vector2>` **motion_mirroring**
- +-----------+----------------------+
- | *Default* | ``Vector2(0, 0)`` |
- +-----------+----------------------+
- | *Setter* | set_mirroring(value) |
- +-----------+----------------------+
- | *Getter* | get_mirroring() |
- +-----------+----------------------+
- The ParallaxLayer's :ref:`Texture2D<class_Texture2D>` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0``, the :ref:`Texture2D<class_Texture2D>` will not be mirrored.
- ----
- .. _class_ParallaxLayer_property_motion_offset:
- - :ref:`Vector2<class_Vector2>` **motion_offset**
- +-----------+--------------------------+
- | *Default* | ``Vector2(0, 0)`` |
- +-----------+--------------------------+
- | *Setter* | set_motion_offset(value) |
- +-----------+--------------------------+
- | *Getter* | get_motion_offset() |
- +-----------+--------------------------+
- The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`ParallaxBackground.scroll_offset<class_ParallaxBackground_property_scroll_offset>`.
- ----
- .. _class_ParallaxLayer_property_motion_scale:
- - :ref:`Vector2<class_Vector2>` **motion_scale**
- +-----------+-------------------------+
- | *Default* | ``Vector2(1, 1)`` |
- +-----------+-------------------------+
- | *Setter* | set_motion_scale(value) |
- +-----------+-------------------------+
- | *Getter* | get_motion_scale() |
- +-----------+-------------------------+
- Multiplies the ParallaxLayer's motion. If an axis is set to ``0``, it will not scroll.
- .. |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.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|