class_parallaxlayer.rst 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ParallaxLayer.xml.
  6. .. _class_ParallaxLayer:
  7. ParallaxLayer
  8. =============
  9. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A parallax scrolling layer to be used with :ref:`ParallaxBackground<class_ParallaxBackground>`.
  11. Description
  12. -----------
  13. 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.
  14. This node's children will be affected by its scroll offset.
  15. \ **Note:** Any changes to this node's position and scale made after it enters the scene will be ignored.
  16. Properties
  17. ----------
  18. +-------------------------------+------------------------------------------------------------------------+-------------------+
  19. | :ref:`Vector2<class_Vector2>` | :ref:`motion_mirroring<class_ParallaxLayer_property_motion_mirroring>` | ``Vector2(0, 0)`` |
  20. +-------------------------------+------------------------------------------------------------------------+-------------------+
  21. | :ref:`Vector2<class_Vector2>` | :ref:`motion_offset<class_ParallaxLayer_property_motion_offset>` | ``Vector2(0, 0)`` |
  22. +-------------------------------+------------------------------------------------------------------------+-------------------+
  23. | :ref:`Vector2<class_Vector2>` | :ref:`motion_scale<class_ParallaxLayer_property_motion_scale>` | ``Vector2(1, 1)`` |
  24. +-------------------------------+------------------------------------------------------------------------+-------------------+
  25. Property Descriptions
  26. ---------------------
  27. .. _class_ParallaxLayer_property_motion_mirroring:
  28. - :ref:`Vector2<class_Vector2>` **motion_mirroring**
  29. +-----------+----------------------+
  30. | *Default* | ``Vector2(0, 0)`` |
  31. +-----------+----------------------+
  32. | *Setter* | set_mirroring(value) |
  33. +-----------+----------------------+
  34. | *Getter* | get_mirroring() |
  35. +-----------+----------------------+
  36. 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.
  37. ----
  38. .. _class_ParallaxLayer_property_motion_offset:
  39. - :ref:`Vector2<class_Vector2>` **motion_offset**
  40. +-----------+--------------------------+
  41. | *Default* | ``Vector2(0, 0)`` |
  42. +-----------+--------------------------+
  43. | *Setter* | set_motion_offset(value) |
  44. +-----------+--------------------------+
  45. | *Getter* | get_motion_offset() |
  46. +-----------+--------------------------+
  47. The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`ParallaxBackground.scroll_offset<class_ParallaxBackground_property_scroll_offset>`.
  48. ----
  49. .. _class_ParallaxLayer_property_motion_scale:
  50. - :ref:`Vector2<class_Vector2>` **motion_scale**
  51. +-----------+-------------------------+
  52. | *Default* | ``Vector2(1, 1)`` |
  53. +-----------+-------------------------+
  54. | *Setter* | set_motion_scale(value) |
  55. +-----------+-------------------------+
  56. | *Getter* | get_motion_scale() |
  57. +-----------+-------------------------+
  58. Multiplies the ParallaxLayer's motion. If an axis is set to ``0``, it will not scroll.
  59. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  60. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  61. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  62. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  63. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  64. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`