class_parallaxlayer.rst 3.7 KB

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