Filling in documentation

VisibilityNotifier and VisibilityEnabler (2D and 3D).

(cherry picked from commit 3ba4e6b2ac)
This commit is contained in:
CowThing 2016-05-30 15:05:27 -04:00 committed by Rémi Verschelde
parent 7928b5fef6
commit 566d751e39
1 changed files with 33 additions and 0 deletions

View File

@ -40728,8 +40728,10 @@ This method controls whether the position between two cached points is interpola
</class> </class>
<class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core"> <class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core">
<brief_description> <brief_description>
Enable certain nodes only when visible.
</brief_description> </brief_description>
<description> <description>
The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself.
</description> </description>
<methods> <methods>
<method name="set_enabler"> <method name="set_enabler">
@ -40738,6 +40740,7 @@ This method controls whether the position between two cached points is interpola
<argument index="1" name="enabled" type="bool"> <argument index="1" name="enabled" type="bool">
</argument> </argument>
<description> <description>
Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler is not in view. See the constants for enablers and what they affect.
</description> </description>
</method> </method>
<method name="is_enabler_enabled" qualifiers="const"> <method name="is_enabler_enabled" qualifiers="const">
@ -40746,13 +40749,16 @@ This method controls whether the position between two cached points is interpola
<argument index="0" name="enabler" type="int"> <argument index="0" name="enabler" type="int">
</argument> </argument>
<description> <description>
Returns whether the specified enabler was set to true or not.
</description> </description>
</method> </method>
</methods> </methods>
<constants> <constants>
<constant name="ENABLER_FREEZE_BODIES" value="1"> <constant name="ENABLER_FREEZE_BODIES" value="1">
This enabler will freeze [RigidBody] nodes.
</constant> </constant>
<constant name="ENABLER_PAUSE_ANIMATIONS" value="0"> <constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
This enabler will pause [AnimationPlayer] nodes.
</constant> </constant>
<constant name="ENABLER_MAX" value="2"> <constant name="ENABLER_MAX" value="2">
</constant> </constant>
@ -40760,8 +40766,10 @@ This method controls whether the position between two cached points is interpola
</class> </class>
<class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core"> <class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core">
<brief_description> <brief_description>
Enable certain nodes only when visible.
</brief_description> </brief_description>
<description> <description>
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.
</description> </description>
<methods> <methods>
<method name="set_enabler"> <method name="set_enabler">
@ -40770,6 +40778,7 @@ This method controls whether the position between two cached points is interpola
<argument index="1" name="enabled" type="bool"> <argument index="1" name="enabled" type="bool">
</argument> </argument>
<description> <description>
Set an enabler to true for all nodes of its type to be disabled when the VisibilityEnabler2D is not in view. See the constants for enablers and what they affect.
</description> </description>
</method> </method>
<method name="is_enabler_enabled" qualifiers="const"> <method name="is_enabler_enabled" qualifiers="const">
@ -40778,19 +40787,25 @@ This method controls whether the position between two cached points is interpola
<argument index="0" name="enabler" type="int"> <argument index="0" name="enabler" type="int">
</argument> </argument>
<description> <description>
Returns whether the specified enabler was set to true or not.
</description> </description>
</method> </method>
</methods> </methods>
<constants> <constants>
<constant name="ENABLER_FREEZE_BODIES" value="1"> <constant name="ENABLER_FREEZE_BODIES" value="1">
This enabler will freeze [RigidBody2D] nodes.
</constant> </constant>
<constant name="ENABLER_PAUSE_ANIMATIONS" value="0"> <constant name="ENABLER_PAUSE_ANIMATIONS" value="0">
This enabler will pause [AnimationPlayer] nodes.
</constant> </constant>
<constant name="ENABLER_PAUSE_PARTICLES" value="2"> <constant name="ENABLER_PAUSE_PARTICLES" value="2">
This enabler will stop [Particles2D] nodes.
</constant> </constant>
<constant name="ENABLER_PARENT_PROCESS" value="3"> <constant name="ENABLER_PARENT_PROCESS" value="3">
This enabler will stop the parent's _process function.
</constant> </constant>
<constant name="ENABLER_PARENT_FIXED_PROCESS" value="4"> <constant name="ENABLER_PARENT_FIXED_PROCESS" value="4">
This enabler will stop the parent's _fixed_process function.
</constant> </constant>
<constant name="ENABLER_MAX" value="5"> <constant name="ENABLER_MAX" value="5">
</constant> </constant>
@ -40798,48 +40813,57 @@ This method controls whether the position between two cached points is interpola
</class> </class>
<class name="VisibilityNotifier" inherits="Spatial" category="Core"> <class name="VisibilityNotifier" inherits="Spatial" category="Core">
<brief_description> <brief_description>
Detect when the node is visible on screen.
</brief_description> </brief_description>
<description> <description>
The VisibilityNotifier is used to notify when its bounding box enters the screen, is visible on the screen, or when it exits the screen.
</description> </description>
<methods> <methods>
<method name="set_aabb"> <method name="set_aabb">
<argument index="0" name="rect" type="AABB"> <argument index="0" name="rect" type="AABB">
</argument> </argument>
<description> <description>
Set the visibility bounding box of the VisibilityNotifier.
</description> </description>
</method> </method>
<method name="get_aabb" qualifiers="const"> <method name="get_aabb" qualifiers="const">
<return type="AABB"> <return type="AABB">
</return> </return>
<description> <description>
Return the visibility bounding box of the VisibilityNotifier.
</description> </description>
</method> </method>
<method name="is_on_screen" qualifiers="const"> <method name="is_on_screen" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return true if any part of the bounding box is on the screen.
</description> </description>
</method> </method>
</methods> </methods>
<signals> <signals>
<signal name="enter_screen"> <signal name="enter_screen">
<description> <description>
Emitted when the VisibilityNotifier enters the screen.
</description> </description>
</signal> </signal>
<signal name="enter_camera"> <signal name="enter_camera">
<argument index="0" name="camera" type="Object"> <argument index="0" name="camera" type="Object">
</argument> </argument>
<description> <description>
Emitted when the VisibilityNotifier enters a [Camera]'s view.
</description> </description>
</signal> </signal>
<signal name="exit_screen"> <signal name="exit_screen">
<description> <description>
Emitted when the VisibilityNotifier exits the screen.
</description> </description>
</signal> </signal>
<signal name="exit_camera"> <signal name="exit_camera">
<argument index="0" name="camera" type="Object"> <argument index="0" name="camera" type="Object">
</argument> </argument>
<description> <description>
Emitted when the VisibilityNotifier exits a [Camera]'s view.
</description> </description>
</signal> </signal>
</signals> </signals>
@ -40848,48 +40872,57 @@ This method controls whether the position between two cached points is interpola
</class> </class>
<class name="VisibilityNotifier2D" inherits="Node2D" category="Core"> <class name="VisibilityNotifier2D" inherits="Node2D" category="Core">
<brief_description> <brief_description>
Detect when the node is visible on screen.
</brief_description> </brief_description>
<description> <description>
The VisibilityNotifier2D is used to notify when its bounding rectangle enters the screen, is visible on the screen, or when it exits the screen.
</description> </description>
<methods> <methods>
<method name="set_rect"> <method name="set_rect">
<argument index="0" name="rect" type="Rect2"> <argument index="0" name="rect" type="Rect2">
</argument> </argument>
<description> <description>
Set the visibility bounding rectangle of the VisibilityNotifier2D.
</description> </description>
</method> </method>
<method name="get_rect" qualifiers="const"> <method name="get_rect" qualifiers="const">
<return type="Rect2"> <return type="Rect2">
</return> </return>
<description> <description>
Return the visibility bounding rectangle of the VisibilityNotifier2D.
</description> </description>
</method> </method>
<method name="is_on_screen" qualifiers="const"> <method name="is_on_screen" qualifiers="const">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return true if any part of the bounding rectangle is on the screen.
</description> </description>
</method> </method>
</methods> </methods>
<signals> <signals>
<signal name="enter_screen"> <signal name="enter_screen">
<description> <description>
Emitted when the VisibilityNotifier2D enters the screen.
</description> </description>
</signal> </signal>
<signal name="enter_viewport"> <signal name="enter_viewport">
<argument index="0" name="viewport" type="Object"> <argument index="0" name="viewport" type="Object">
</argument> </argument>
<description> <description>
Emitted when the VisibilityNotifier2D enters a [Viewport].
</description> </description>
</signal> </signal>
<signal name="exit_screen"> <signal name="exit_screen">
<description> <description>
Emitted when the VisibilityNotifier2D exits the screen.
</description> </description>
</signal> </signal>
<signal name="exit_viewport"> <signal name="exit_viewport">
<argument index="0" name="viewport" type="Object"> <argument index="0" name="viewport" type="Object">
</argument> </argument>
<description> <description>
Emitted when the VisibilityNotifier2D exits a [Viewport].
</description> </description>
</signal> </signal>
</signals> </signals>