ParallaxLayer.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ParallaxLayer" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. A parallax scrolling layer to be used with [ParallaxBackground].
  5. </brief_description>
  6. <description>
  7. A ParallaxLayer must be the child of a [ParallaxBackground] node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the [member ParallaxBackground.scroll_offset] value.
  8. This node's children will be affected by its scroll offset.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <demos>
  13. </demos>
  14. <methods>
  15. <method name="get_mirroring" qualifiers="const">
  16. <return type="Vector2">
  17. </return>
  18. <description>
  19. Return the mirroring of the ParallaxLayer.
  20. </description>
  21. </method>
  22. <method name="get_motion_offset" qualifiers="const">
  23. <return type="Vector2">
  24. </return>
  25. <description>
  26. </description>
  27. </method>
  28. <method name="get_motion_scale" qualifiers="const">
  29. <return type="Vector2">
  30. </return>
  31. <description>
  32. Return the motion scale of the ParallaxLayer.
  33. </description>
  34. </method>
  35. <method name="set_mirroring">
  36. <return type="void">
  37. </return>
  38. <argument index="0" name="mirror" type="Vector2">
  39. </argument>
  40. <description>
  41. Set the mirroring of the ParallaxLayer. If an axis is set to 0 then that axis will have no mirroring.
  42. </description>
  43. </method>
  44. <method name="set_motion_offset">
  45. <return type="void">
  46. </return>
  47. <argument index="0" name="offset" type="Vector2">
  48. </argument>
  49. <description>
  50. </description>
  51. </method>
  52. <method name="set_motion_scale">
  53. <return type="void">
  54. </return>
  55. <argument index="0" name="scale" type="Vector2">
  56. </argument>
  57. <description>
  58. 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.
  59. </description>
  60. </method>
  61. </methods>
  62. <members>
  63. <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring">
  64. The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code] the [Texture] will not be mirrored. Default value: [code](0, 0)[/code].
  65. </member>
  66. <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset">
  67. The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
  68. </member>
  69. <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale">
  70. Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code] it will not scroll.
  71. </member>
  72. </members>
  73. <constants>
  74. </constants>
  75. </class>