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/EditorProperty.xml | 14 | ||||
-rw-r--r-- | doc/classes/File.xml | 1 | ||||
-rw-r--r-- | doc/classes/InputEventMIDI.xml | 33 | ||||
-rw-r--r-- | doc/classes/Physics2DServer.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/TileSet.xml | 22 |
12 files changed, 130 insertions, 8 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/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/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/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/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/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/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> |