diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/AnimatedTexture.xml | 22 | ||||
-rw-r--r-- | doc/classes/CollisionObject2D.xml | 18 | ||||
-rw-r--r-- | doc/classes/CollisionPolygon2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/CollisionShape2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/Control.xml | 8 | ||||
-rw-r--r-- | doc/classes/EditorProperty.xml | 14 | ||||
-rw-r--r-- | doc/classes/EditorSpatialGizmo.xml | 27 | ||||
-rw-r--r-- | doc/classes/EditorSpatialGizmoPlugin.xml | 21 | ||||
-rw-r--r-- | doc/classes/Expression.xml | 4 | ||||
-rw-r--r-- | doc/classes/File.xml | 1 | ||||
-rw-r--r-- | doc/classes/Image.xml | 8 | ||||
-rw-r--r-- | doc/classes/InputEventMIDI.xml | 33 | ||||
-rw-r--r-- | doc/classes/KinematicBody.xml | 2 | ||||
-rw-r--r-- | doc/classes/KinematicBody2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/Particles2D.xml | 5 | ||||
-rw-r--r-- | doc/classes/Physics2DServer.xml | 2 | ||||
-rw-r--r-- | doc/classes/PhysicsDirectSpaceState.xml | 2 | ||||
-rw-r--r-- | doc/classes/StyleBox.xml | 6 | ||||
-rw-r--r-- | doc/classes/SurfaceTool.xml | 8 | ||||
-rw-r--r-- | doc/classes/Theme.xml | 8 | ||||
-rw-r--r-- | doc/classes/TileMap.xml | 2 | ||||
-rw-r--r-- | doc/classes/TileSet.xml | 22 |
22 files changed, 198 insertions, 21 deletions
diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index 9dc58ed195..08cd79e78f 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -1,8 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AnimatedTexture" inherits="Texture" category="Core" version="3.1"> <brief_description> + Proxy texture for simple frame-based animations. </brief_description> <description> + [code]AnimatedTexture[/code] is a resource format for simple frame-based animations, where multiple frames textures can be chained automatically with a predefined delay for each frame. It's not a [Node], contrarily to [AnimationPlayer] or [AnimatedSprite], but has the advantage of being usable at any place where a [Texture] resource can be used, e.g. in a [TileSet]. + The playback of the animation is controlled by the [member fps] property as well as each frame's optional delay (see [method set_frame_delay]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. + [code]AnimatedTexture[/code] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. </description> <tutorials> </tutorials> @@ -15,6 +19,7 @@ <argument index="0" name="frame" type="int"> </argument> <description> + Retrieves the delayed assigned to the given [code]frame[/code] ID. </description> </method> <method name="get_frame_texture" qualifiers="const"> @@ -23,6 +28,7 @@ <argument index="0" name="frame" type="int"> </argument> <description> + Retrieves the [Texture] assigned to the given [code]frame[/code] ID. </description> </method> <method name="set_frame_delay"> @@ -33,6 +39,14 @@ <argument index="1" name="delay" type="float"> </argument> <description> + Defines an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code]. + For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be: + [codeblock] + Frame 0: 0.5 s (1 / fps) + Frame 1: 1.7 s (1 / fps + 1.2) + Frame 2: 0.5 s (1 / fps) + Total duration: 2.7 s + [/codeblock] </description> </method> <method name="set_frame_texture"> @@ -43,15 +57,23 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Assigns a [Texture] to the given [code]frame[/code] ID. IDs start at 0 (so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1). + You can define any frame texture up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation. </description> </method> </methods> <members> <member name="fps" type="float" setter="set_fps" getter="get_fps"> + Number of frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). Default value: 4. + For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run over 4 seconds, with one frame each 0.5 seconds. </member> <member name="frames" type="int" setter="set_frames" getter="get_frames"> + Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]. Default value: 1. </member> </members> <constants> + <constant name="MAX_FRAMES" value="256"> + The maximum number of frames supported by [code]AnimatedTexture[/code]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite]. + </constant> </constants> </class> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index 48a198b248..91f283a2b7 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -40,6 +40,14 @@ Returns the object's [RID]. </description> </method> + <method name="get_shape_owner_one_way_collision_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="owner_id" type="int"> + </argument> + <description> + </description> + </method> <method name="get_shape_owners"> <return type="Array"> </return> @@ -185,6 +193,16 @@ If [code]enable[/code] is [code]true[/code], collisions for the shape owner originating from this [code]CollisionObject2D[/code] will not be reported to collided with [code]CollisionObject2D[/code]s. </description> </method> + <method name="shape_owner_set_one_way_collision_margin"> + <return type="void"> + </return> + <argument index="0" name="owner_id" type="int"> + </argument> + <argument index="1" name="margin" type="float"> + </argument> + <description> + </description> + </method> <method name="shape_owner_set_transform"> <return type="void"> </return> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index f63adbf71a..3dd87a4120 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -22,6 +22,8 @@ <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. </member> + <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin"> + </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> The polygon's list of vertices. The final point will be connected to the first. </member> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index d3c616ee3d..07dbde1c21 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -20,6 +20,8 @@ <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> Sets whether this collision shape should only detect collision on one side (top or bottom). </member> + <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin"> + </member> <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> The actual shape owned by this collision shape. </member> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index f067b50c72..d27839e0a6 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -681,7 +681,7 @@ [b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system. </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter"> - Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. See the constants to learn what each does. + Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does. </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents"> Enables whether rendering of children should be clipped to this control's rectangle. If true, parts of a child which would be visibly outside of this control's rectangle will not be rendered. @@ -929,13 +929,13 @@ Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter"> - The control will receive mouse button input events through [method _gui_input] if clicked on. These events are automatically marked as handled and they will not propagate further to other controls. + The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled and they will not propagate further to other controls. This also results in blocking signals in other controls. </constant> <constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter"> - The control will receive mouse button input events through [method _gui_input] if clicked on. If this control does not handle the event, the parent control (if any) will be considered for a mouse click, and so on until there is no more parent control to potentially handle it. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. + The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. </constant> <constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter"> - The control will not receive mouse button input events through [method _gui_input] and will not block other controls from receiving these events. These events will also not be handled automatically. + The control will not receive mouse button input events through [method _gui_input]. Also the control will not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. </constant> <constant name="GROW_DIRECTION_BEGIN" value="0" enum="GrowDirection"> The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 7d09554330..b3fc036edb 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -9,6 +9,20 @@ <demos> </demos> <methods> + <method name="emit_changed"> + <return type="void"> + </return> + <argument index="0" name="property" type="String"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <argument index="2" name="field" type="String" default=""""> + </argument> + <argument index="3" name="changing" type="bool" default="false"> + </argument> + <description> + </description> + </method> <method name="get_edited_object"> <return type="Object"> </return> diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index c3ecd3c3b7..45b92276f1 100644 --- a/doc/classes/EditorSpatialGizmo.xml +++ b/doc/classes/EditorSpatialGizmo.xml @@ -4,7 +4,7 @@ Custom gizmo for editing Spatial objects. </brief_description> <description> - Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. These are created by [method EditorSpatialGizmoPlugin.create_gizmo]. + Custom gizmo that is used for providing custom visualization and editing (handles) for 3D Spatial objects. See [EditorSpatialGizmoPlugin] for more information. </description> <tutorials> </tutorials> @@ -116,7 +116,30 @@ <argument index="0" name="index" type="int"> </argument> <description> - Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle] + Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]. + </description> + </method> + <method name="get_plugin" qualifiers="const"> + <return type="EditorSpatialGizmoPlugin"> + </return> + <description> + Return the [EditorSpatialGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorSpatialGizmoPlugin.get_material]. + </description> + </method> + <method name="get_spatial_node" qualifiers="const"> + <return type="Spatial"> + </return> + <description> + Returns the Spatial node associated with this gizmo. + </description> + </method> + <method name="is_handle_highlighted" qualifiers="virtual"> + <return type="bool"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Get whether a handle is highlighted or not. </description> </method> <method name="redraw" qualifiers="virtual"> diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml index 521ec748b3..a62b23ead8 100644 --- a/doc/classes/EditorSpatialGizmoPlugin.xml +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -1,10 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorSpatialGizmoPlugin" inherits="Resource" category="Core" version="3.1"> <brief_description> + Used by the editor to define Spatial gizmo types. </brief_description> <description> + EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorSpatialGizmoPlugin] for the simpler gizmos, or creating a new [EditorSpatialGizmo] type. See the tutorial in the documentation for more info. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link> </tutorials> <demos> </demos> @@ -17,12 +20,14 @@ <argument index="1" name="material" type="SpatialMaterial"> </argument> <description> + Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. </description> </method> <method name="can_be_hidden" qualifiers="virtual"> <return type="bool"> </return> <description> + Override this method to define whether the gizmo can be hidden or not. Defaults to true. </description> </method> <method name="commit_handle" qualifiers="virtual"> @@ -37,6 +42,7 @@ <argument index="3" name="cancel" type="bool" default="false"> </argument> <description> + Override this method to commit gizmo handles. Called for this plugin's active gizmos. </description> </method> <method name="create_gizmo" qualifiers="virtual"> @@ -45,6 +51,7 @@ <argument index="0" name="spatial" type="Spatial"> </argument> <description> + Override this method to return a custom [EditorSpatialGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. (See also [method has_gizmo]) </description> </method> <method name="create_handle_material"> @@ -55,6 +62,7 @@ <argument index="1" name="billboard" type="bool" default="false"> </argument> <description> + Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_handles]. Should not be overridden. </description> </method> <method name="create_icon_material"> @@ -69,6 +77,7 @@ <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <description> + Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_unscaled_billboard]. Should not be overridden. </description> </method> <method name="create_material"> @@ -85,6 +94,7 @@ <argument index="4" name="use_vertex_color" type="bool" default="false"> </argument> <description> + Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorSpatialGizmo.add_mesh] and [method EditorSpatialGizmo.add_lines]. Should not be overridden. </description> </method> <method name="get_handle_name" qualifiers="virtual"> @@ -95,6 +105,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Override this method to provide gizmo's handle names. Called for this plugin's active gizmos. </description> </method> <method name="get_handle_value" qualifiers="virtual"> @@ -105,6 +116,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Get actual value of a handle from gizmo. Called for this plugin's active gizmos. </description> </method> <method name="get_material"> @@ -115,12 +127,14 @@ <argument index="1" name="gizmo" type="EditorSpatialGizmo"> </argument> <description> + Get material from the internal list of materials. If an [EditorSpatialGizmo] is provided it will try to get the corresponding variant (selected and/or editable). </description> </method> <method name="get_name" qualifiers="virtual"> <return type="String"> </return> <description> + Override this method to provide the name that will appear in teh gizmo visibility menu. </description> </method> <method name="has_gizmo" qualifiers="virtual"> @@ -129,9 +143,10 @@ <argument index="0" name="spatial" type="Spatial"> </argument> <description> + Override this method to define which Spatial nodes have a gizmo from this plugin. Whenever a [Spatial] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorSpatialGizmo] assigned and is added to this plugin's list of active gizmos. </description> </method> - <method name="is_gizmo_handle_highlighted" qualifiers="virtual"> + <method name="is_handle_highlighted" qualifiers="virtual"> <return type="bool"> </return> <argument index="0" name="gizmo" type="EditorSpatialGizmo"> @@ -139,12 +154,14 @@ <argument index="1" name="index" type="int"> </argument> <description> + Get whether a handle is highlighted or not. Called for this plugin's active gizmos. </description> </method> <method name="is_selectable_when_hidden" qualifiers="virtual"> <return type="bool"> </return> <description> + Override this method to define whether Spatial with this gizmo should be selecteble even when the gizmo is hidden. </description> </method> <method name="redraw" qualifiers="virtual"> @@ -153,6 +170,7 @@ <argument index="0" name="gizmo" type="EditorSpatialGizmo"> </argument> <description> + Callback to redraw the provided gizmo. Called for this plugin's active gizmos. </description> </method> <method name="set_handle" qualifiers="virtual"> @@ -167,6 +185,7 @@ <argument index="3" name="point" type="Vector2"> </argument> <description> + Update the value of a handle after it has been updated. Called for this plugin's active gizmos. </description> </method> </methods> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index c5f71fe55e..78623b359e 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -16,7 +16,7 @@ func _on_text_entered(command): var error = expression.parse(command, []) if error != OK: - print(get_error_text()) + print(expression.get_error_text()) return var result = expression.execute([], null, true) if not expression.has_execute_failed(): @@ -39,6 +39,7 @@ </argument> <description> Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed]. + If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order. </description> </method> <method name="get_error_text" qualifiers="const"> @@ -64,6 +65,7 @@ </argument> <description> Parses the expression and returns a [enum @GlobalScope.Error]. + You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed. </description> </method> </methods> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 1967349546..6462176c73 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -48,6 +48,7 @@ </argument> <description> Returns [code]true[/code] if the file exists in the given path. + Note that many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the [code]res://.import[/code] folder). To check for the existence of such resources while taking into account the remapping to their imported location, use [method ResourceLoader.exists]. Typically, using [code]File.file_exists[/code] on an imported resource would work while you are developing in the editor (the source asset is present in [code]res://[/code], but fail when exported). </description> </method> <method name="get_16" qualifiers="const"> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 56accdcd9e..8868dd778d 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -4,7 +4,7 @@ Image datatype. </brief_description> <description> - Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [code]Image[/code] is 16384 pixels. + Native image datatype. Contains image data, which can be converted to a [Texture], and several functions to interact with it. The maximum width and height for an [code]Image[/code] are [constant MAX_WIDTH] and [constant MAX_HEIGHT]. </description> <tutorials> </tutorials> @@ -476,6 +476,12 @@ </member> </members> <constants> + <constant name="MAX_WIDTH" value="16384"> + The maximal width allowed for [code]Image[/code] resources. + </constant> + <constant name="MAX_HEIGHT" value="16384"> + The maximal height allowed for [code]Image[/code] resources. + </constant> <constant name="FORMAT_L8" value="0" enum="Format"> </constant> <constant name="FORMAT_LA8" value="1" enum="Format"> diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml new file mode 100644 index 0000000000..2cdd70e42c --- /dev/null +++ b/doc/classes/InputEventMIDI.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="InputEventMIDI" inherits="InputEvent" category="Core" version="3.1"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <demos> + </demos> + <methods> + </methods> + <members> + <member name="channel" type="int" setter="set_channel" getter="get_channel"> + </member> + <member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number"> + </member> + <member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value"> + </member> + <member name="instrument" type="int" setter="set_instrument" getter="get_instrument"> + </member> + <member name="message" type="int" setter="set_message" getter="get_message"> + </member> + <member name="pitch" type="int" setter="set_pitch" getter="get_pitch"> + </member> + <member name="pressure" type="int" setter="set_pressure" getter="get_pressure"> + </member> + <member name="velocity" type="int" setter="set_velocity" getter="get_velocity"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index ad41f48ddd..a4fade6ab2 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -89,7 +89,7 @@ </argument> <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method. + [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. [i]TODO: Update for new stop_on_slode argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 986010f832..b94304b9a8 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -89,7 +89,7 @@ </argument> <description> Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. - [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method. + [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. [i]TODO: Update for stop_on_slope argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index a6d23ed0f2..91c1a0ca9b 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -16,12 +16,14 @@ <return type="Rect2"> </return> <description> + Returns a rectangle containing the positions of all existing particles. </description> </method> <method name="restart"> <return type="void"> </return> <description> + Restarts all the existing particles. </description> </method> </methods> @@ -39,8 +41,10 @@ How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. </member> <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. </member> <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> Amount of time each particle will exist. Default value: [code]1[/code]. @@ -49,6 +53,7 @@ If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. </member> <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + Normal map to be used for the [code]texture[/code] property. </member> <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index cd887ff950..fe1465260f 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -735,6 +735,8 @@ </argument> <argument index="2" name="enable" type="bool"> </argument> + <argument index="3" name="margin" type="float"> + </argument> <description> Enables one way collision on body if [code]enable[/code] is [code]true[/code]. </description> diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml index c4dc103b72..118010b3cf 100644 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -21,7 +21,7 @@ </argument> <description> Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. - If the shape can not move, the returned array will be [code][0, 0][/code]. + If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics. </description> </method> <method name="collide_shape"> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index dee3e6db49..be21abe275 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -27,6 +27,12 @@ <description> </description> </method> + <method name="get_current_item_drawn" qualifiers="const"> + <return type="CanvasItem"> + </return> + <description> + </description> + </method> <method name="get_margin" qualifiers="const"> <return type="float"> </return> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 2e5d5d81c9..fd158587e5 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -75,14 +75,6 @@ Specify a Tangent for the next Vertex to use. </description> </method> - <method name="add_to_format"> - <return type="void"> - </return> - <argument index="0" name="flags" type="int"> - </argument> - <description> - </description> - </method> <method name="add_triangle_fan"> <return type="void"> </return> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 8c6acd2c51..bffd8ea6d9 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -80,6 +80,14 @@ Sets theme values to a copy of the default theme values. </description> </method> + <method name="copy_theme"> + <return type="void"> + </return> + <argument index="0" name="other" type="Theme"> + </argument> + <description> + </description> + </method> <method name="get_color" qualifiers="const"> <return type="Color"> </return> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index fb5a733ccd..4849d768f5 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -244,7 +244,7 @@ <argument index="0" name="world_position" type="Vector2"> </argument> <description> - Returns the tilemap (grid-based) coordinatescorresponding to the given global position. + Returns the tilemap (grid-based) coordinates corresponding to the given local position. </description> </method> </methods> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 9e31f7e1b1..4abe94f119 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -439,6 +439,16 @@ Returns the one-way collision value of a tile's shape. </description> </method> + <method name="tile_get_shape_one_way_margin" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="shape_id" type="int"> + </argument> + <description> + </description> + </method> <method name="tile_get_shape_transform" qualifiers="const"> <return type="Transform2D"> </return> @@ -633,6 +643,18 @@ Enables one-way collision on a tile's shape. </description> </method> + <method name="tile_set_shape_one_way_margin"> + <return type="void"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="shape_id" type="int"> + </argument> + <argument index="2" name="one_way" type="float"> + </argument> + <description> + </description> + </method> <method name="tile_set_shape_transform"> <return type="void"> </return> |