VisibilityEnabler2D.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.1">
  3. <brief_description>
  4. Enable certain nodes only when visible.
  5. </brief_description>
  6. <description>
  7. The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. </methods>
  15. <members>
  16. <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled">
  17. If [code]true[/code], [RigidBody2D] nodes will be paused.
  18. </member>
  19. <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled">
  20. If [code]true[/code], [AnimatedSprite] nodes will be paused.
  21. </member>
  22. <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled">
  23. If [code]true[/code], [AnimationPlayer] nodes will be paused.
  24. </member>
  25. <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled">
  26. If [code]true[/code], [Particles2D] nodes will be paused.
  27. </member>
  28. <member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled">
  29. If [code]true[/code], the parent's [method Node._physics_process] will be stopped.
  30. </member>
  31. <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled">
  32. If [code]true[/code], the parent's [method Node._process] will be stopped.
  33. </member>
  34. </members>
  35. <constants>
  36. <constant name="ENABLER_PAUSE_ANIMATIONS" value="0" enum="Enabler">
  37. This enabler will pause [AnimationPlayer] nodes.
  38. </constant>
  39. <constant name="ENABLER_FREEZE_BODIES" value="1" enum="Enabler">
  40. This enabler will freeze [RigidBody2D] nodes.
  41. </constant>
  42. <constant name="ENABLER_PAUSE_PARTICLES" value="2" enum="Enabler">
  43. This enabler will stop [Particles2D] nodes.
  44. </constant>
  45. <constant name="ENABLER_PARENT_PROCESS" value="3" enum="Enabler">
  46. This enabler will stop the parent's _process function.
  47. </constant>
  48. <constant name="ENABLER_PARENT_PHYSICS_PROCESS" value="4" enum="Enabler">
  49. This enabler will stop the parent's _physics_process function.
  50. </constant>
  51. <constant name="ENABLER_PAUSE_ANIMATED_SPRITES" value="5" enum="Enabler">
  52. </constant>
  53. <constant name="ENABLER_MAX" value="6" enum="Enabler">
  54. </constant>
  55. </constants>
  56. </class>