diff options
Diffstat (limited to 'doc/base')
-rw-r--r-- | doc/base/classes.xml | 429 |
1 files changed, 307 insertions, 122 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml index dc4f4918b5..e3af2ff8ee 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -5083,10 +5083,10 @@ </class> <class name="Area2D" inherits="CollisionObject2D" category="Core"> <brief_description> - General purpose area detection and influence for 2D physics. + 2D area that detects nodes that enter or exit it. Can override 2D physics properties within range. </brief_description> <description> - General purpose area detection for 2D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass. + 2D area that detects nodes that enter or exit it. Change the 'space_override' property SPACE_OVERRIDE_* to override physics parameters for nodes like [Rigidbody2D]. E.g. gravity, damping... See [CollisionObject2D] for usage. </description> <methods> <method name="get_angular_damp" qualifiers="const"> @@ -5115,14 +5115,14 @@ <argument index="0" name="bit" type="int"> </argument> <description> - Return an individual bit on the layer mask. + Return an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer. </description> </method> <method name="get_collision_mask" qualifiers="const"> <return type="int"> </return> <description> - Return the physics layers this area can scan for collisions. + Return the physics layers this area will scan to determine collisions. </description> </method> <method name="get_collision_mask_bit" qualifiers="const"> @@ -5131,7 +5131,7 @@ <argument index="0" name="bit" type="int"> </argument> <description> - Return an individual bit on the collision mask. + Return an individual bit on the collision mask. Describes whether this area will collide with others on the given layer. </description> </method> <method name="get_gravity" qualifiers="const"> @@ -5166,14 +5166,14 @@ <return type="Array"> </return> <description> - Return a list of the areas that are totally or partially inside this area. + Returns a list of the [Area2D]s that intersect with this area. </description> </method> <method name="get_overlapping_bodies" qualifiers="const"> <return type="Array"> </return> <description> - Return a list of the bodies ([PhysicsBody2D]) that are totally or partially inside this area. + Return a list of the [PhysicsBody2D]s that intersect with this area. </description> </method> <method name="get_priority" qualifiers="const"> @@ -5395,33 +5395,50 @@ </method> </methods> <members> - <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief=""> + <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" brief="rate of spin loss"> + The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'. </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" brief=""> + <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" brief="name of audio bus"> + The name of the Area2D's audio bus. </member> - <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" brief=""> + <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" brief="Whether to override audio bus"> + If [code]true[/code], overrides the default audio bus with the Area2D's. Defaults to [code]false[/code]. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief=""> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief="others-collide-with-this layers"> + The physics layer this Area2D is in. + Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask]. + A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief=""> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief="this-collides-with-others layers"> + The physics layers this Area2D scans to determine collision detections. </member> - <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" brief=""> + <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" brief="internal gravity intensity"> + The gravity intensity within the Area2D (ranges -1024 to 1024). This is useful to alter the force of gravity without altering its direction. + This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity). </member> - <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" brief=""> + <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" brief="gravity drop rate"> + The falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance. </member> - <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" brief=""> + <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" brief="is gravity a point?"> + If [code]true[/code], calculates gravity from a particular point during a space override (see [method set_space_override_mode]). If a point, [Vector2] position is set with [method set_gravity_vector]. Defaults to [code]false[/code]. </member> - <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" brief=""> + <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" brief="gravity non-normalized vector or center-point"> + The gravitational direction/strength as a vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center. </member> - <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief=""> + <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" brief="rate of movement loss"> + The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'. </member> - <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" brief=""> + <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" brief="others cannot detect this?"> + If [code]true[/code], other monitoring areas can detect this Area2D (is it undetectable at the moment?). Defaults to [code]true[/code]. </member> - <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief=""> + <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief="this cannot detect others?"> + If [code]true[/code], this detects bodies/areas entering/exiting it (can it detect others at the moment?). Defaults to [code]true[/code]. </member> - <member name="priority" type="float" setter="set_priority" getter="get_priority" brief=""> + <member name="priority" type="float" setter="set_priority" getter="get_priority" brief="(high) process before others (low)"> + The processing order for this priority. Ranges from 0 to 128. Defaults to 0. Higher priorities are processed first. </member> - <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="" enum="Area2D.SpaceOverride"> + <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="how to override gravity/damping" enum="Area2D.SpaceOverride"> + How to override gravity and damping calculations within this Area2D, if at all. Consult the SPACE_OVERRIDE_* constants for available options. </member> </members> <signals> @@ -5507,6 +5524,11 @@ </signal> </signals> <constants> + <constant name="SPACE_OVERRIDE_DISABLED" value="0" enum="Area2D.SpaceOverride">This area does not affect gravity/damp. These are areas that exist only to detect collisions and objects entering or exiting them.</constant> + <constant name="SPACE_OVERRIDE_COMBINE" value="1" enum="Area2D.SpaceOverride">This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.</constant> + <constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2" enum="Area2D.SpaceOverride">This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.</constant> + <constant name="SPACE_OVERRIDE_REPLACE" value="3" enum="Area2D.SpaceOverride">This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.</constant> + <constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4" enum="Area2D.SpaceOverride">This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.</constant> </constants> </class> <class name="Array" category="Built-In Types"> @@ -9270,6 +9292,7 @@ <return type="String"> </return> <description> + Returns the name of the bone node attached to. </description> </method> <method name="set_bone_name"> @@ -9278,6 +9301,7 @@ <argument index="0" name="bone_name" type="String"> </argument> <description> + Changes the name of the bone node </description> </method> </methods> @@ -12294,10 +12318,10 @@ </class> <class name="Color" category="Built-In Types"> <brief_description> - Color in RGBA format. + Color in RGBA format with some support for ARGB format. </brief_description> <description> - A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate() ) may accept values > 1. + A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values > 1. </description> <methods> <method name="Color"> @@ -12312,7 +12336,10 @@ <argument index="3" name="a" type="float"> </argument> <description> - Construct the color from an RGBA profile. + Constructs a color from an RGBA profile using values between 0 and 1 (float). + [codeblock] + var c = Color(0.2, 1.0, .7, .8) # a color of an RGBA(51, 255, 178, 204) + [/codeblock] </description> </method> <method name="Color"> @@ -12325,7 +12352,10 @@ <argument index="2" name="b" type="float"> </argument> <description> - Construct the color from an RGBA profile. + Constructs a color from an RGB profile using values between 0 and 1 (float). Alpha will always be 1. + [codeblock] + var c = Color(0.2, 1.0, .7) # a color of an RGBA(51, 255, 178, 255) + [/codeblock] </description> </method> <method name="Color"> @@ -12334,7 +12364,10 @@ <argument index="0" name="from" type="int"> </argument> <description> - Construct the color from an RGBA profile. + Constructs a color from a 32-bit integer (each byte represents a component of the RGBA profile). + [codeblock] + var c = Color(274) # a color of an RGBA(0, 0, 1, 18) + [/codeblock] </description> </method> <method name="Color"> @@ -12343,7 +12376,19 @@ <argument index="0" name="from" type="String"> </argument> <description> - Construct the color from an RGBA profile. + Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. + The following string formats are supported: + [code]"#ff00ff00"[/code] - ARGB format with '#' + [code]"ff00ff00"[/code] - ARGB format + [code]"#ff00ff"[/code] - RGB format with '#' + [code]"ff00ff"[/code] - RGB format + [codeblock] + # The following code creates the same color of an RGBA(178, 217, 10, 255) + var c1 = Color("#ffb2d90a") # ARGB format with '#' + var c2 = Color("ffb2d90a") # ARGB format + var c3 = Color("#b2d90a") # RGB format with '#' + var c4 = Color("b2d90a") # RGB format + [/codeblock] </description> </method> <method name="blend"> @@ -12352,28 +12397,46 @@ <argument index="0" name="over" type="Color"> </argument> <description> - Return a new color blended with anothor one. + Returns a new color resulting from blending this color over another color. If the color is opaque, the result would also be opaque. The other color could then take a range of values with different alpha values. + [codeblock] + var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50% + var fg = Color(1.0, 0.0, 0.0, .5) # Red with alpha of 50% + var blendedColor = bg.blend(fg) # Brown with alpha of 75% + [/codeblock] </description> </method> <method name="contrasted"> <return type="Color"> </return> <description> - Return the most contrasting color with this one. + Returns the most contrasting color. + [codeblock] + var c = Color(.3, .4, .9) + var contrastedColor = c.contrasted() # a color of an RGBA(204, 229, 102, 255) + [/codeblock] </description> </method> <method name="gray"> <return type="float"> </return> <description> - Convert the color to gray. + Returns the color's grayscale. + The gray is calculated by (r + g + b) / 3. + [codeblock] + var c = Color(0.2, 0.45, 0.82) + var gray = c.gray() # a value of 0.466667 + [/codeblock] </description> </method> <method name="inverted"> <return type="Color"> </return> <description> - Return the inverted color (1-r, 1-g, 1-b, 1-a). + Returns the inverted color (1-r, 1-g, 1-b, 1-a). + [codeblock] + var c = Color(.3, .4, .9) + var invertedColor = c.inverted() # a color of an RGBA(178, 153, 26, 255) + [/codeblock] </description> </method> <method name="linear_interpolate"> @@ -12384,21 +12447,36 @@ <argument index="1" name="t" type="float"> </argument> <description> - Return the linear interpolation with another color. + Returns the color of the linear interpolation with another color. The value t is between 0 and 1 (float). + [codeblock] + var c1 = Color(1.0, 0.0, 0.0) + var c2 = Color(0.0, 1.0, 0.0) + var li_c = c1.linear_interpolate(c2, 0.5) # a color of an RGBA(128, 128, 0, 255) + [/codeblock] </description> </method> - <method name="to_32"> + <method name="to_rgba32"> <return type="int"> </return> <description> - Convert the color to a 32 its integer (each byte represents a RGBA). + Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). + [codeblock] + var c = Color(1, .5, .2) + print(str(c.to_32())) # prints 4294934323 + [/codeblock] + + [i]This is same as [method to_ARGB32] but may be changed later to support RGBA format instead[/i]. </description> </method> - <method name="to_ARGB32"> + <method name="to_argb32"> <return type="int"> </return> <description> - Convert color to ARGB32, more compatible with DirectX. + Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). More compatible with DirectX. + [codeblock] + var c = Color(1, .5, .2) + print(str(c.to_32())) # prints 4294934323 + [/codeblock] </description> </method> <method name="to_html"> @@ -12407,7 +12485,13 @@ <argument index="0" name="with_alpha" type="bool" default="True"> </argument> <description> - Return the HTML hexadecimal color string. + Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]). + Optionally flag 'false' to not include alpha in hexadecimal string. + [codeblock] + var c = Color(1, 1, 1, .5) + var s1 = c.to_html() # Results "7fffffff" + var s2 = c.to_html(false) # Results 'ffffff' + [/codeblock] </description> </method> </methods> @@ -12589,6 +12673,12 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Set new color to ColorRect. + + [codeblock] + var cr = get_node("colorrect_node") + cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red + [/codeblock] </description> </method> </methods> @@ -12636,14 +12726,21 @@ </class> <class name="ColorRect" inherits="Control" category="Core"> <brief_description> + Colored rect for canvas. </brief_description> <description> + An object that is represented on the canvas as a rect with color. [Color] is used to set or get color info for the rect. </description> <methods> <method name="get_frame_color" qualifiers="const"> <return type="Color"> </return> <description> + Return the color in RGBA format. + [codeblock] + var cr = get_node("colorrect_node") + var c = cr.get_frame_color() # Default color is white + [/codeblock] </description> </method> <method name="set_frame_color"> @@ -12652,6 +12749,11 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Set new color to ColorRect. + [codeblock] + var cr = get_node("colorrect_node") + cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red + [/codeblock] </description> </method> </methods> @@ -22150,7 +22252,7 @@ IP Protocol support functions. </brief_description> <description> - IP contains some support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded. + IP contains support functions for the IPv4 protocol. TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides hostname resolution support, both blocking and threaded. </description> <methods> <method name="clear_cache"> @@ -22159,6 +22261,7 @@ <argument index="0" name="hostname" type="String" default=""""> </argument> <description> + Removes all of a "hostname"'s cached references. If no "hostname" is given then all cached IP addresses are removed. </description> </method> <method name="erase_resolve_item"> @@ -22167,13 +22270,14 @@ <argument index="0" name="id" type="int"> </argument> <description> - Erase a queue ID, removing it from the queue if needed. This should be used after a queue is completed to free it and enable more queries to happen. + Removes a given item "id" from the queue. This should be used to free a queue after it has completed to enable more queries to happen. </description> </method> - <method name="get_local_addresses" qualifiers="const"> + <method name="get_local_addresses" qualifiers="const"> <return type="Array"> </return> <description> + Returns all of the user's current IPv4 and IPv6 addresses as an array. </description> </method> <method name="get_resolve_item_address" qualifiers="const"> @@ -22182,7 +22286,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Return a resolved item address, or an empty string if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]). + Returns a queued hostname's IP address, given its queue "id". Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). </description> </method> <method name="get_resolve_item_status" qualifiers="const"> @@ -22191,7 +22295,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Return the status of hostname queued for resolving, given its queue ID. Returned status can be any of the RESOLVER_STATUS_* enumeration. + Returns a queued hostname's status as a RESOLVER_STATUS_* constant, given its queue "id". </description> </method> <method name="resolve_hostname"> @@ -22202,7 +22306,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Resolve a given hostname, blocking. Resolved hostname is returned as an IPv4 or IPv6 depending on "ip_type". + Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the TYPE_* constant given as "ip_type". </description> </method> <method name="resolve_hostname_queue_item"> @@ -22213,7 +22317,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Create a queue item for resolving a given hostname to an IPv4 or IPv6 depending on "ip_type". The queue ID is returned, or RESOLVER_INVALID_ID on error. + Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the TYPE_* constant given as "ip_type". Returns the queue ID if successful, or RESOLVER_INVALID_ID on error. </description> </method> </methods> @@ -27429,6 +27533,7 @@ <return type="Shape"> </return> <description> + Calculate a [ConvexPolygonShape] from the mesh. </description> </method> <method name="create_outline" qualifiers="const"> @@ -27437,24 +27542,28 @@ <argument index="0" name="margin" type="float"> </argument> <description> + Calculate an outline mesh at a defined offset (margin) from the original mesh. Note: Typically returns the vertices in reverse order (e.g. clockwise to anti-clockwise). </description> </method> <method name="create_trimesh_shape" qualifiers="const"> <return type="Shape"> </return> <description> + Calculate a [ConcavePolygonShape] from the mesh. </description> </method> <method name="generate_triangle_mesh" qualifiers="const"> <return type="TriangleMesh"> </return> <description> + Generate a [TriangleMesh] from the mesh. </description> </method> <method name="get_faces" qualifiers="const"> <return type="PoolVector3Array"> </return> <description> + Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. </description> </method> </methods> @@ -27826,6 +27935,7 @@ <return type="void"> </return> <description> + This helper creates a [StaticBody] child [Node] with a [ConvexPolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing. </description> </method> <method name="create_debug_tangents"> @@ -27838,14 +27948,14 @@ <return type="void"> </return> <description> - This helper creates a [StaticBody] child [Node] using the mesh geometry as collision. It's mainly used for testing. + This helper creates a [StaticBody] child [Node] with a [ConcavePolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing. </description> </method> <method name="get_mesh" qualifiers="const"> <return type="Mesh"> </return> <description> - Return the current [Mesh] resource for the instance. + Returns the current [Mesh] resource for the instance. </description> </method> <method name="get_skeleton_path"> @@ -27860,6 +27970,7 @@ <argument index="0" name="surface" type="int"> </argument> <description> + Returns the [Material] for a surface of the [Mesh] resource. </description> </method> <method name="set_mesh"> @@ -27868,7 +27979,6 @@ <argument index="0" name="mesh" type="Mesh"> </argument> <description> - Set the [Mesh] resource for the instance. </description> </method> <method name="set_skeleton_path"> @@ -27887,13 +27997,16 @@ <argument index="1" name="material" type="Material"> </argument> <description> + Sets the [Material] for a surface of the [Mesh] resource. </description> </method> </methods> <members> <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" brief=""> + The [Mesh] resource for the instance. </member> <member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" brief=""> + [NodePath] to the [Skeleton] associated with the instance. </member> </members> <constants> @@ -30107,10 +30220,10 @@ </class> <class name="Node2D" inherits="CanvasItem" category="Core"> <brief_description> - Base node for 2D system. + A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index. </brief_description> <description> - Base node for 2D system. Node2D contains a position, rotation and scale, which is used to position and animate. It can alternatively be used with a custom 2D transform ([Transform2D]). A tree of Node2Ds allows complex hierarchies for animation and positioning. + A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order. </description> <methods> <method name="apply_scale"> @@ -30119,7 +30232,7 @@ <argument index="0" name="ratio" type="Vector2"> </argument> <description> - Apply the 'ratio' scale to the 2D node, according to its current scale value. + Multiplies the current scale by the 'ratio' vector. </description> </method> <method name="edit_set_pivot"> @@ -30128,7 +30241,7 @@ <argument index="0" name="pivot" type="Vector2"> </argument> <description> - Set the pivot position of the 2D node to 'pivot' value. This method is implemented only in some nodes that inherit Node2D. + Set the pivot position of the 2D node to 'pivot' value. Only some Node2Ds implement this method. </description> </method> <method name="get_angle_to" qualifiers="const"> @@ -30137,42 +30250,42 @@ <argument index="0" name="point" type="Vector2"> </argument> <description> - Return the rotation angle in radians needed for the 2d node to point at 'point' position. + Returns the angle between the node and the 'point' in radians. </description> </method> <method name="get_global_position" qualifiers="const"> <return type="Vector2"> </return> <description> - Return the global position of the 2D node. + Returns the node's global position. </description> </method> <method name="get_global_rotation" qualifiers="const"> <return type="float"> </return> <description> - Return the global rotation in radians of the 2D node. + Returns the node's global rotation in radians. </description> </method> <method name="get_global_rotation_in_degrees" qualifiers="const"> <return type="float"> </return> <description> - Return the global rotation in degrees of the 2D node. + Return the node's global rotation in degrees. </description> </method> <method name="get_global_scale" qualifiers="const"> <return type="Vector2"> </return> <description> - Return the global scale of the 2D node. + Returns the node's global scale. </description> </method> <method name="get_position" qualifiers="const"> <return type="Vector2"> </return> <description> - Return the position of the 2D node. + Returns the node's position. </description> </method> <method name="get_relative_transform_to_parent" qualifiers="const"> @@ -30181,35 +30294,35 @@ <argument index="0" name="parent" type="Node"> </argument> <description> - Return the transform [Transform2D] calculated relatively to the parent of this 2D node. + Returns the [Transform2D] relative to this node's parent. </description> </method> <method name="get_rotation" qualifiers="const"> <return type="float"> </return> <description> - Return the rotation in radians of the 2D node. + Returns the node's rotation in radians. </description> </method> <method name="get_rotation_in_degrees" qualifiers="const"> <return type="float"> </return> <description> - Return the rotation in degrees of the 2D node. + Returns the node's rotation in degrees. </description> </method> <method name="get_scale" qualifiers="const"> <return type="Vector2"> </return> <description> - Return the scale of the 2D node. + Returns the node's scale. </description> </method> <method name="get_z" qualifiers="const"> <return type="int"> </return> <description> - Return the Z-index of the 2D node. + Returns the node's Z-index. </description> </method> <method name="global_translate"> @@ -30218,14 +30331,14 @@ <argument index="0" name="offset" type="Vector2"> </argument> <description> - Apply a global translation of 'offset' to the 2D node, starting from its current global position. + Adds the 'offset' vector to the node's global position. </description> </method> <method name="is_z_relative" qualifiers="const"> <return type="bool"> </return> <description> - Return true if the Z-index value of this 2D node is relative to its parent's. Else, return false. + Returns true if this node's Z-index is relative to its parent's. Else, returns false. </description> </method> <method name="look_at"> @@ -30234,7 +30347,7 @@ <argument index="0" name="point" type="Vector2"> </argument> <description> - Rotate the 2d node so it points at 'point' position. + Rotates the node so it points towards the 'point'. </description> </method> <method name="move_local_x"> @@ -30245,7 +30358,7 @@ <argument index="1" name="scaled" type="bool" default="false"> </argument> <description> - Apply a local translation on X axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized. + Apply a local translation on the node's X axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. </description> </method> <method name="move_local_y"> @@ -30256,7 +30369,7 @@ <argument index="1" name="scaled" type="bool" default="false"> </argument> <description> - Apply a local translation on Y axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized. + Apply a local translation on the node's Y axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement. </description> </method> <method name="rotate"> @@ -30265,7 +30378,7 @@ <argument index="0" name="radians" type="float"> </argument> <description> - Apply a rotation (in radians) to the 2D node, starting from its current rotation. + Apply a rotation to the node, in radians, starting from its current rotation. </description> </method> <method name="set_global_position"> @@ -30274,7 +30387,7 @@ <argument index="0" name="pos" type="Vector2"> </argument> <description> - Set the global position of the 2D node. + Set the node's global position. </description> </method> <method name="set_global_rotation"> @@ -30283,7 +30396,7 @@ <argument index="0" name="radians" type="float"> </argument> <description> - Set the global rotation in radians of the 2D node + Set the node's global rotation in radians. </description> </method> <method name="set_global_rotation_in_degrees"> @@ -30292,7 +30405,7 @@ <argument index="0" name="degrees" type="float"> </argument> <description> - Set the global rotation in degrees of the 2D node + Set the node's global rotation in degrees. </description> </method> <method name="set_global_scale"> @@ -30301,7 +30414,7 @@ <argument index="0" name="scale" type="Vector2"> </argument> <description> - Set the global scale of the 2D node. + Set the node's global scale. </description> </method> <method name="set_global_transform"> @@ -30310,7 +30423,7 @@ <argument index="0" name="xform" type="Transform2D"> </argument> <description> - Set the global transform [Transform2D] of the 2D node. + Set the node's global [Transform2D]. </description> </method> <method name="set_position"> @@ -30319,7 +30432,7 @@ <argument index="0" name="pos" type="Vector2"> </argument> <description> - Set the position of the 2D node. + Set the node's position. </description> </method> <method name="set_rotation"> @@ -30328,7 +30441,7 @@ <argument index="0" name="radians" type="float"> </argument> <description> - Set the rotation in radians of the 2D node. + Set the node's rotation in radians. </description> </method> <method name="set_rotation_in_degrees"> @@ -30337,7 +30450,7 @@ <argument index="0" name="degrees" type="float"> </argument> <description> - Set the rotation in degrees of the 2D node. + Set the node's rotation in degrees. </description> </method> <method name="set_scale"> @@ -30346,7 +30459,7 @@ <argument index="0" name="scale" type="Vector2"> </argument> <description> - Set the scale of the 2D node. + Set the node's scale. </description> </method> <method name="set_transform"> @@ -30355,7 +30468,7 @@ <argument index="0" name="xform" type="Transform2D"> </argument> <description> - Set the local transform [Transform2D] of the 2D node. + Set the node's local [Transform2D]. </description> </method> <method name="set_z"> @@ -30364,7 +30477,7 @@ <argument index="0" name="z" type="int"> </argument> <description> - Set the Z-index value of the 2D node. + Set the node's Z-index. </description> </method> <method name="set_z_as_relative"> @@ -30373,7 +30486,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Set the Z-index value as relative to the parent node of this 2D node. Thus, if this 2D node's Z-index value is 2 and its parent's effective Z-index is 3, then the effective Z-index value of this 2D node would be 3 + 2 = 5. + Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. </description> </method> <method name="to_global" qualifiers="const"> @@ -30398,34 +30511,46 @@ <argument index="0" name="offset" type="Vector2"> </argument> <description> - Apply a local translation of 'offset' to the 2D node, starting from its current local position. + Translate the node locally by the 'offset' vector, starting from its current local position. </description> </method> </methods> <members> <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" brief=""> + Global position. </member> <member name="global_rotation" type="float" setter="set_global_rotation" getter="get_global_rotation" brief=""> + Global rotation in radians. </member> <member name="global_rotation_deg" type="float" setter="set_global_rotation_in_degrees" getter="get_global_rotation_in_degrees" brief=""> + Global rotation in degrees. </member> <member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale" brief=""> + Global scale. </member> <member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform" brief=""> + Global [Transform2D]. </member> <member name="position" type="Vector2" setter="set_position" getter="get_position" brief=""> + Position, relative to the node's parent. </member> <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" brief=""> + Rotation in radians. </member> <member name="rotation_deg" type="float" setter="set_rotation_in_degrees" getter="get_rotation_in_degrees" brief=""> + Rotation in degrees. </member> <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" brief=""> + Rotation in degrees. </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" brief=""> + Local [Transform2D]. </member> <member name="z" type="int" setter="set_z" getter="get_z" brief=""> + Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others. </member> <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative" brief=""> + Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. </member> </members> <constants> @@ -40825,11 +40950,11 @@ Query the closest object intersecting a ray. </brief_description> <description> - A RayCast represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 3D space in order to find the closest object intersecting with the ray. + A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 3D space in order to find the closest object along the path of the ray. - RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks. + RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks. - Only enabled raycasts will be able to query the space and report collisions! + Only enabled raycasts will be able to query the space and report collisions. RayCast calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. </description> @@ -40840,7 +40965,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> - Adds a collision exception so the ray does not report collisions with the specified [code]node[/code]. + Adds a collision exception so the ray does not report collisions with the specified node. </description> </method> <method name="add_exception_rid"> @@ -40849,20 +40974,22 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Adds a collision exception so the ray does not report collisions with the specified [RID]. </description> </method> <method name="clear_exceptions"> <return type="void"> </return> <description> - Removes all collision exception for this ray. + Removes all collision exceptions for this ray. </description> </method> <method name="force_raycast_update"> <return type="void"> </return> <description> - Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work. + Updates the collision information for the ray. + Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. </description> </method> <method name="get_cast_to" qualifiers="const"> @@ -40876,14 +41003,24 @@ <return type="Object"> </return> <description> - Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Return the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast.is_colliding(): + var collider = RayCast.get_collider() + [/codeblock] </description> </method> <method name="get_collider_shape" qualifiers="const"> <return type="int"> </return> <description> - Returns the collision shape of the closest object the ray is pointing to. + Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast.is_colliding(): + var shape = RayCast.get_collider_shape() + [/codeblock] </description> </method> <method name="get_collision_layer" qualifiers="const"> @@ -40897,14 +41034,14 @@ <return type="Vector3"> </return> <description> - Returns the normal of the intersecting object shape face containing the collision point. + Returns the normal of the intersecting object's shape at the collision point. </description> </method> <method name="get_collision_point" qualifiers="const"> <return type="Vector3"> </return> <description> - Returns collision point. This point is in [b]global[/b] coordinate system. + Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. </description> </method> <method name="get_type_mask" qualifiers="const"> @@ -40925,7 +41062,7 @@ <return type="bool"> </return> <description> - Returns whether this raycast is enabled or not. + Returns whether the ray is enabled or not. </description> </method> <method name="remove_exception"> @@ -40934,7 +41071,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> - Removes a collision exception so the ray does report collisions with the specified [code]node[/code]. + Removes a collision exception so the ray does report collisions with the specified node. </description> </method> <method name="remove_exception_rid"> @@ -40943,6 +41080,7 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Removes a collision exception so the ray does report collisions with the specified [RID]. </description> </method> <method name="set_cast_to"> @@ -40951,7 +41089,7 @@ <argument index="0" name="local_point" type="Vector3"> </argument> <description> - Sets to which point ray should be casted. This point is in [b]local[/b] coordinate system. + Sets the ray destination point, so that the ray will test from the ray's origin to [code]local_point[/code]. </description> </method> <method name="set_collision_layer"> @@ -40984,12 +41122,20 @@ </methods> <members> <member name="cast_to" type="Vector3" setter="set_cast_to" getter="get_cast_to" brief=""> + The ray's destination point, relative to the RayCast's [code]position[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief=""> + The RayCast's collison layer(s). Only bodies in the same collision layer(s) will be detected. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief=""> + If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. </member> <member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask" brief=""> + Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. + Example: + [codeblock] + RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY + [/codeblock] </member> </members> <constants> @@ -41000,12 +41146,9 @@ Query the closest object intersecting a ray. </brief_description> <description> - A RayCast2D represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 2D space in order to find the closest object intersecting with the ray. - - RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks. - - Only enabled raycasts will be able to query the space and report collisions! - + A RayCast represents a line from its origin to its destination position, [code]cast_to[/code]. It is used to query the 2D space in order to find the closest object along the path of the ray. + RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], by setting proper filtering with collision layers, or by filtering object types with type masks. + Only enabled raycasts will be able to query the space and report collisions. RayCast2D calculates intersection every fixed frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between fixed frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. </description> <methods> @@ -41015,7 +41158,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> - Adds a collision exception so the ray does not report collisions with the specified [code]node[/code]. + Adds a collision exception so the ray does not report collisions with the specified node. </description> </method> <method name="add_exception_rid"> @@ -41024,20 +41167,21 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Adds a collision exception so the ray does not report collisions with the specified [RID]. </description> </method> <method name="clear_exceptions"> <return type="void"> </return> <description> - Removes all collision exception for this ray. + Removes all collision exceptions for this ray. </description> </method> <method name="force_raycast_update"> <return type="void"> </return> <description> - Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work. + Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_fixed_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. </description> </method> <method name="get_cast_to" qualifiers="const"> @@ -41051,14 +41195,24 @@ <return type="Object"> </return> <description> - Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Returns the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast2D.is_colliding(): + var collider = RayCast2D.get_collider() + [/codeblock] </description> </method> <method name="get_collider_shape" qualifiers="const"> <return type="int"> </return> <description> - Returns the collision shape of the closest object the ray is pointing to. + Returns the collision shape of the closest object the ray is pointing to. Note that this does not consider the length of the ray, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Example: + [codeblock] + if RayCast2D.is_colliding(): + var shape = RayCast2D.get_collider_shape() + [/codeblock] </description> </method> <method name="get_collision_layer" qualifiers="const"> @@ -41072,14 +41226,14 @@ <return type="Vector2"> </return> <description> - Returns the normal of the intersecting object shape face containing the collision point. + Returns the normal of the intersecting object's shape at the collision point. </description> </method> <method name="get_collision_point" qualifiers="const"> <return type="Vector2"> </return> <description> - Returns the collision point in which the ray intersects the closest object. This point is in [b]global[/b] coordinate system. + Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. </description> </method> <method name="get_exclude_parent_body" qualifiers="const"> @@ -41116,7 +41270,7 @@ <argument index="0" name="node" type="Object"> </argument> <description> - Removes a collision exception so the ray does report collisions with the specified [code]node[/code]. + Removes a collision exception so the ray does report collisions with the specified node. </description> </method> <method name="remove_exception_rid"> @@ -41125,6 +41279,7 @@ <argument index="0" name="rid" type="RID"> </argument> <description> + Removes a collision exception so the ray does report collisions with the specified [RID]. </description> </method> <method name="set_cast_to"> @@ -41175,14 +41330,23 @@ </methods> <members> <member name="cast_to" type="Vector2" setter="set_cast_to" getter="get_cast_to" brief=""> + The ray's destination point, relative to the RayCast's [code]position[/code]. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief=""> + The RayCast2D's collison layer(s). Only bodies in the same collision layer(s) will be detected. </member> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" brief=""> + If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. </member> <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" brief=""> + If [code]true[/code], the parent node will be excluded from collision detection. Default value: [code]true[/code]. </member> <member name="type_mask" type="int" setter="set_type_mask" getter="get_type_mask" brief=""> + Object types to detect using a logical sum (OR operation) of type constants defined in [Physics2DDirectSpaceState]. + Example: + [codeblock] + RayCast.type_mask = Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY + [/codeblock] </member> </members> <constants> @@ -49569,7 +49733,7 @@ - Rounded corners (individual radius for each corner) - Shadow About corner radius: - Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example: + Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example: [codeblock] height = 30 corner_radius_top_left = 50 @@ -51883,10 +52047,10 @@ </class> <class name="TextureRect" inherits="Control" category="Core"> <brief_description> - Control Frame that draws a texture. + Control that draws a texture. </brief_description> <description> - Control frame that simply draws an assigned texture. It can stretch or not. It's a simple way to just show an image in a UI. + Control that draws a texture. </description> <methods> <method name="get_stretch_mode" qualifiers="const"> @@ -51934,10 +52098,13 @@ </methods> <members> <member name="expand" type="bool" setter="set_expand" getter="has_expand" brief=""> + If [code]true[/code] texture will expand to fit. Default value: [code]false[/code]. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="" enum="TextureRect.StretchMode"> + Stretch mode of the texture. Use STRETCH_* constants as value. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief=""> + The [Texture] resource for the node. </member> </members> <constants> @@ -52317,11 +52484,10 @@ </class> <class name="TileMap" inherits="Node2D" category="Core"> <brief_description> - Node for 2D tile-based games. + Node for 2D tile-based maps. </brief_description> <description> - Node for 2D tile-based games. Tilemaps use a [TileSet] which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps. - To optimize drawing and culling (sort of like [GridMap]), you can specify a quadrant size, so chunks of the map will be batched together at drawing time. + Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. </description> <methods> <method name="clear"> @@ -52764,40 +52930,55 @@ </methods> <members> <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" brief=""> + The custom [Transform2D] to be applied to the TileMap's cells. </member> <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" brief="" enum="TileMap.HalfOffset"> + Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED. </member> <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" brief=""> + The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. </member> <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" brief=""> + The TileMap's cell size. </member> <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" brief="" enum="TileMap.TileOrigin"> + Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT. </member> <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled" brief=""> + If [code]true[/code] the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. </member> <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" brief=""> + Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0. </member> <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" brief=""> + Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" brief=""> + The collision layer(s) for all colliders in the TileMap. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" brief=""> + The collision mask(s) for all colliders in the TileMap. </member> <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" brief=""> + If [code]true[/code] TileMap collisions will be handled as a kinematic body. If [code]false[/code] collisions will be handled as static body. Default value: [code]false[/code]. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="TileMap.Mode"> + The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. </member> <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" brief=""> + The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s). </member> <member name="tile_data" type="PoolIntArray" setter="_set_tile_data" getter="_get_tile_data" brief=""> + A [PoolIntArray] containing </member> <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset" brief=""> + The assigned [TileSet]. </member> </members> <signals> <signal name="settings_changed"> <description> - Signal indicating that a tilemap setting has changed. + Emitted when a tilemap setting has changed. </description> </signal> </signals> @@ -53202,10 +53383,10 @@ </class> <class name="Timer" inherits="Node" category="Core"> <brief_description> - A simple Timer node. + A countdown timer. </brief_description> <description> - Timer node. This is a simple node that will emit a timeout callback when the timer runs out. It can optionally be set to loop. + Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one shot" mode. </description> <methods> <method name="get_time_left" qualifiers="const"> @@ -53305,40 +53486,44 @@ <return type="void"> </return> <description> - Start the timer. + Start the Timer. </description> </method> <method name="stop"> <return type="void"> </return> <description> - Stop (cancel) the timer. + Stop (cancel) the Timer. </description> </method> </methods> <members> <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart" brief=""> + If [code]true[/code], Timer will automatically start when entering the scene tree. Default value: [code]false[/code]. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" brief=""> + If [code]true[/code], Timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. </member> <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" brief="" enum="Timer.TimerProcessMode"> + Processing mode. Uses TIMER_PROCESS_* constants as value. </member> <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" brief=""> + Wait time in seconds. </member> </members> <signals> <signal name="timeout"> <description> - Emitted when the time runs out. + Emitted when the Timer reaches 0. </description> </signal> </signals> <constants> <constant name="TIMER_PROCESS_FIXED" value="0"> - Update the timer at fixed intervals (framerate processing). + Update the Timer at fixed intervals (framerate processing). </constant> <constant name="TIMER_PROCESS_IDLE" value="1"> - Update the timer during the idle time at each frame. + Update the Timer during the idle time at each frame. </constant> </constants> </class> |