class_parallaxlayer.rst 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ParallaxLayer.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ParallaxLayer:
  5. ParallaxLayer
  6. =============
  7. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A parallax scrolling layer to be used with :ref:`ParallaxBackground<class_parallaxbackground>`.
  12. Member Functions
  13. ----------------
  14. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`Vector2<class_vector2>` | :ref:`get_mirroring<class_ParallaxLayer_get_mirroring>` **(** **)** const |
  16. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Vector2<class_vector2>` | :ref:`get_motion_offset<class_ParallaxLayer_get_motion_offset>` **(** **)** const |
  18. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Vector2<class_vector2>` | :ref:`get_motion_scale<class_ParallaxLayer_get_motion_scale>` **(** **)** const |
  20. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_mirroring<class_ParallaxLayer_set_mirroring>` **(** :ref:`Vector2<class_vector2>` mirror **)** |
  22. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`set_motion_offset<class_ParallaxLayer_set_motion_offset>` **(** :ref:`Vector2<class_vector2>` offset **)** |
  24. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_motion_scale<class_ParallaxLayer_set_motion_scale>` **(** :ref:`Vector2<class_vector2>` scale **)** |
  26. +--------------------------------+--------------------------------------------------------------------------------------------------------------------+
  27. Member Variables
  28. ----------------
  29. - :ref:`Vector2<class_vector2>` **motion_mirroring**
  30. - :ref:`Vector2<class_vector2>` **motion_offset**
  31. - :ref:`Vector2<class_vector2>` **motion_scale**
  32. Description
  33. -----------
  34. A ParallaxLayer must be the child of a :ref:`ParallaxBackground<class_parallaxbackground>` node. All child nodes will be affected by the parallax scrolling of this layer.
  35. Member Function Description
  36. ---------------------------
  37. .. _class_ParallaxLayer_get_mirroring:
  38. - :ref:`Vector2<class_vector2>` **get_mirroring** **(** **)** const
  39. Return the mirroring of the ParallaxLayer.
  40. .. _class_ParallaxLayer_get_motion_offset:
  41. - :ref:`Vector2<class_vector2>` **get_motion_offset** **(** **)** const
  42. .. _class_ParallaxLayer_get_motion_scale:
  43. - :ref:`Vector2<class_vector2>` **get_motion_scale** **(** **)** const
  44. Return the motion scale of the ParallaxLayer.
  45. .. _class_ParallaxLayer_set_mirroring:
  46. - void **set_mirroring** **(** :ref:`Vector2<class_vector2>` mirror **)**
  47. Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring.
  48. .. _class_ParallaxLayer_set_motion_offset:
  49. - void **set_motion_offset** **(** :ref:`Vector2<class_vector2>` offset **)**
  50. .. _class_ParallaxLayer_set_motion_scale:
  51. - void **set_motion_scale** **(** :ref:`Vector2<class_vector2>` scale **)**
  52. Set the motion scale of the ParallaxLayer. If an axis is set to 0 then it will not move at all, it will stick with the camera.