1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- :github_url: hide
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the ParallaxLayer.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_ParallaxLayer:
- ParallaxLayer
- =============
- **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- **Category:** Core
- Brief Description
- -----------------
- A parallax scrolling layer to be used with :ref:`ParallaxBackground<class_ParallaxBackground>`.
- Properties
- ----------
- +-------------------------------+------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`motion_mirroring<class_ParallaxLayer_property_motion_mirroring>` |
- +-------------------------------+------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`motion_offset<class_ParallaxLayer_property_motion_offset>` |
- +-------------------------------+------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`motion_scale<class_ParallaxLayer_property_motion_scale>` |
- +-------------------------------+------------------------------------------------------------------------+
- 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 that any changes to this node's position and scale made after it enters the scene will be ignored.
- Property Descriptions
- ---------------------
- .. _class_ParallaxLayer_property_motion_mirroring:
- - :ref:`Vector2<class_Vector2>` **motion_mirroring**
- +----------+----------------------+
- | *Setter* | set_mirroring(value) |
- +----------+----------------------+
- | *Getter* | get_mirroring() |
- +----------+----------------------+
- The ParallaxLayer's :ref:`Texture<class_Texture>` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0`` the :ref:`Texture<class_Texture>` will not be mirrored. Default value: ``(0, 0)``.
- ----
- .. _class_ParallaxLayer_property_motion_offset:
- - :ref:`Vector2<class_Vector2>` **motion_offset**
- +----------+--------------------------+
- | *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**
- +----------+-------------------------+
- | *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.
|