From f54b3c8a452a6976bbf616d83b30187fc9599943 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 10 Mar 2024 10:29:38 +0100 Subject: [PATCH] Updates to the LayeredTileMap modules's docs. --- .../doc_classes/LayeredTileData.xml | 102 ++++---- .../doc_classes/LayeredTileMap.xml | 184 +++++++------- .../doc_classes/LayeredTileMapPattern.xml | 22 +- .../doc_classes/LayeredTileSet.xml | 232 +++++++++--------- .../doc_classes/LayeredTileSetAtlasSource.xml | 114 ++++----- .../LayeredTileSetScenesCollectionSource.xml | 26 +- .../doc_classes/LayeredTileSetSource.xml | 14 +- 7 files changed, 347 insertions(+), 347 deletions(-) diff --git a/modules/layered_tile_map/doc_classes/LayeredTileData.xml b/modules/layered_tile_map/doc_classes/LayeredTileData.xml index 02f8a9eea..a2ac0b594 100644 --- a/modules/layered_tile_map/doc_classes/LayeredTileData.xml +++ b/modules/layered_tile_map/doc_classes/LayeredTileData.xml @@ -1,78 +1,78 @@ - + Settings for a single tile in a [LayeredTileSet]. - [TileData] object represents a single tile in a [LayeredTileSet]. It is usually edited using the tileset editor, but it can be modified at runtime using [method LayeredTileMap._tile_data_runtime_update]. + [LayeredTileData] object represents a single tile in a [LayeredTileSet]. It is usually edited using the tileset editor, but it can be modified at runtime using [method LayeredTileMap._tile_data_runtime_update]. - + Adds a collision polygon to the tile on the given LayeredTileSet physics layer. - - + + Returns the one-way margin (for one-way platforms) of the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id]. - - + + Returns the points of the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id]. - + Returns how many polygons the tile has for LayeredTileSet physics layer with index [param layer_id]. - + Returns the constant angular velocity applied to objects colliding with this tile. - + Returns the constant linear velocity applied to objects colliding with this tile. - + Returns the custom data value for custom data layer named [param layer_name]. - + Returns the custom data value for custom data layer with index [param layer_id]. - - - - + + + + Returns the navigation polygon of the tile for the LayeredTileSet navigation layer with index [param layer_id]. [param flip_h], [param flip_v], and [param transpose] allow transforming the returned polygon. @@ -80,10 +80,10 @@ - - - - + + + + Returns the occluder polygon of the tile for the LayeredTileSet occlusion layer with index [param layer_id]. [param flip_h], [param flip_v], and [param transpose] allow transforming the returned polygon. @@ -91,114 +91,114 @@ - + Returns the tile's terrain bit for the given [param peering_bit] direction. - - + + Returns whether one-way collisions are enabled for the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id]. - - + + Removes the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id]. - - - + + + Enables/disables one-way collisions on the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id]. - - - + + + Enables/disables one-way collisions on the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id]. - - - + + + Sets the points of the polygon at index [param polygon_index] for LayeredTileSet physics layer with index [param layer_id]. - - + + Sets the polygons count for LayeredTileSet physics layer with index [param layer_id]. - - + + Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile. - - + + Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts. - - + + Sets the tile's custom data value for the LayeredTileSet custom data layer with name [param layer_name]. - - + + Sets the tile's custom data value for the LayeredTileSet custom data layer with index [param layer_id]. - - + + Sets the navigation polygon for the LayeredTileSet navigation layer with index [param layer_id]. - - + + Sets the occluder for the LayeredTileSet occlusion layer with index [param layer_id]. - - + + Sets the tile's terrain bit for the given [param peering_bit] direction. @@ -212,7 +212,7 @@ If [code]true[/code], the tile will have its texture flipped vertically. - The [Material] to use for this [TileData]. This can be a [CanvasItemMaterial] to use the default shader, or a [ShaderMaterial] to use a custom shader. + The [Material] to use for this [LayeredTileData]. This can be a [CanvasItemMaterial] to use the default shader, or a [ShaderMaterial] to use a custom shader. Color modulation of the tile. diff --git a/modules/layered_tile_map/doc_classes/LayeredTileMap.xml b/modules/layered_tile_map/doc_classes/LayeredTileMap.xml index 0b9946c36..fe31abba0 100644 --- a/modules/layered_tile_map/doc_classes/LayeredTileMap.xml +++ b/modules/layered_tile_map/doc_classes/LayeredTileMap.xml @@ -20,11 +20,11 @@ - - - + + + - Called with a TileData object about to be used internally by the LayeredTileMap, allowing its modification at runtime. + Called with a LayeredTileData object about to be used internally by the LayeredTileMap, allowing its modification at runtime. This method is only called if [method _use_tile_data_runtime_update] is implemented and returns [code]true[/code] for the given tile [param coords] and [param layer]. [b]Warning:[/b] The [param tile_data] object's sub-resources are the same as the one in the LayeredTileSet. Modifying them might impact the whole LayeredTileSet. Instead, make sure to duplicate those resources. [b]Note:[/b] If the properties of [param tile_data] object should change over time, use [method notify_runtime_tile_data_update] to notify the LayeredTileMap it needs an update. @@ -32,8 +32,8 @@ - - + + Should return [code]true[/code] if the tile at coordinates [param coords] on layer [param layer] requires a runtime update. [b]Warning:[/b] Make sure this function only return [code]true[/code] when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. @@ -42,7 +42,7 @@ - + Adds a layer at the given position [param to_position] in the array. If [param to_position] is negative, the position is counted from the end, with [code]-1[/code] adding the layer at the end of the array. @@ -55,7 +55,7 @@ - + Clears all cells on the given layer. If [param layer] is negative, the layers are accessed from the last one. @@ -63,8 +63,8 @@ - - + + Erases the cell on layer [param layer] at coordinates [param coords]. If [param layer] is negative, the layers are accessed from the last one. @@ -78,16 +78,16 @@ - + Forces the LayeredTileMap and the layer [param layer] to update. - - - + + + Returns the tile alternative ID of the cell on layer [param layer] at [param coords]. If [param use_proxies] is [code]false[/code], ignores the [LayeredTileSet]'s tile proxies, returning the raw alternative identifier. See [method LayeredTileSet.map_tile_proxy]. If [param layer] is negative, the layers are accessed from the last one. @@ -95,9 +95,9 @@ - - - + + + Returns the tile atlas coordinates ID of the cell on layer [param layer] at coordinates [param coords]. If [param use_proxies] is [code]false[/code], ignores the [LayeredTileSet]'s tile proxies, returning the raw alternative identifier. See [method LayeredTileSet.map_tile_proxy]. If [param layer] is negative, the layers are accessed from the last one. @@ -105,9 +105,9 @@ - - - + + + Returns the tile source ID of the cell on layer [param layer] at coordinates [param coords]. Returns [code]-1[/code] if the cell does not exist. If [param use_proxies] is [code]false[/code], ignores the [LayeredTileSet]'s tile proxies, returning the raw alternative identifier. See [method LayeredTileSet.map_tile_proxy]. @@ -115,12 +115,12 @@ - - - - + + + + - Returns the [TileData] object associated with the given cell, or [code]null[/code] if the cell does not exist or is not a [LayeredTileSetAtlasSource]. + Returns the [LayeredTileData] object associated with the given cell, or [code]null[/code] if the cell does not exist or is not a [LayeredTileSetAtlasSource]. If [param layer] is negative, the layers are accessed from the last one. If [param use_proxies] is [code]false[/code], ignores the [LayeredTileSet]'s tile proxies, returning the raw alternative identifier. See [method LayeredTileSet.map_tile_proxy]. [codeblock] @@ -136,21 +136,21 @@ - + Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile. - + Returns the tilemap layer of the tile for given physics body RID. Such RID can be retrieved from [method KinematicCollision2D.get_collider_rid], when colliding with a tile. - + Returns a LayeredTileMap layer's modulate. If [param layer] is negative, the layers are accessed from the last one. @@ -158,7 +158,7 @@ - + Returns a LayeredTileMap layer's name. If [param layer] is negative, the layers are accessed from the last one. @@ -166,7 +166,7 @@ - + Returns the [RID] of the [NavigationServer2D] navigation map assigned to the specified LayeredTileMap layer [param layer]. By default the LayeredTileMap uses the default [World2D] navigation map for the first LayeredTileMap layer. For each additional LayeredTileMap layer a new navigation map is created for the additional layer. @@ -176,7 +176,7 @@ - + Returns a LayeredTileMap layer's Y sort origin. If [param layer] is negative, the layers are accessed from the last one. @@ -184,7 +184,7 @@ - + Returns a LayeredTileMap layer's Z-index value. If [param layer] is negative, the layers are accessed from the last one. @@ -198,23 +198,23 @@ - + Returns the [RID] of the [NavigationServer2D] navigation map assigned to the specified LayeredTileMap layer [param layer]. - - + + Returns the neighboring cell to the one at coordinates [param coords], identified by the [param neighbor] direction. This method takes into account the different layouts a LayeredTileMap can take. - - + + Creates a new [LayeredTileMapPattern] from the given layer and set of cells. If [param layer] is negative, the layers are accessed from the last one. @@ -222,14 +222,14 @@ - + Returns the list of all neighbourings cells to the one at [param coords]. - + Returns a [Vector2i] array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is [code]Vector2(-1, -1)[/code] and its alternative identifier is -1. If [param layer] is negative, the layers are accessed from the last one. @@ -237,10 +237,10 @@ - - - - + + + + Returns a [Vector2i] array with the positions of all cells containing a tile in the given layer. Tiles may be filtered according to their source ([param source_id]), their atlas coordinates ([param atlas_coords]) or alternative id ([param alternative_tile]). If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as [method get_used_cells]. @@ -256,7 +256,7 @@ - + Returns if a layer is enabled. If [param layer] is negative, the layers are accessed from the last one. @@ -264,14 +264,14 @@ - + Returns if a layer's built-in navigation regions generation is enabled. - + Returns if a layer Y-sorts its tiles. If [param layer] is negative, the layers are accessed from the last one. @@ -279,39 +279,39 @@ - + Returns the map coordinates of the cell containing the given [param local_position]. If [param local_position] is in global coordinates, consider using [method Node2D.to_local] before passing it to this method. See also [method map_to_local]. - - - + + + Returns for the given coordinate [param coords_in_pattern] in a [LayeredTileMapPattern] the corresponding cell coordinates if the pattern was pasted at the [param position_in_tilemap] coordinates (see [method set_pattern]). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating [code]position_in_tile_map + coords_in_pattern[/code]. - + Returns the centered position of a cell in the LayeredTileMap's local coordinate space. To convert the returned value into global coordinates, use [method Node2D.to_global]. See also [method local_to_map]. - [b]Note:[/b] This may not correspond to the visual position of the tile, i.e. it ignores the [member TileData.texture_origin] property of individual tiles. + [b]Note:[/b] This may not correspond to the visual position of the tile, i.e. it ignores the [member LayeredTileData.texture_origin] property of individual tiles. - - + + Moves the layer at index [param layer] to the given position [param to_position] in the array. - + Notifies the LayeredTileMap node that calls to [method _use_tile_data_runtime_update] or [method _tile_data_runtime_update] will lead to different results. This will thus trigger a LayeredTileMap update. If [param layer] is provided, only notifies changes for the given layer. Providing the [param layer] argument (when applicable) is usually preferred for performance reasons. @@ -321,18 +321,18 @@ - + Removes the layer at index [param layer]. - - - - - + + + + + Sets the tile identifiers for the cell on layer [param layer] at coordinates [param coords]. Each tile of the [LayeredTileSet] is identified using three parts: - The source identifier [param source_id] identifies a [LayeredTileSetSource] identifier. See [method LayeredTileSet.set_source_id], @@ -344,11 +344,11 @@ - - - - - + + + + + Update all the cells in the [param cells] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. @@ -358,11 +358,11 @@ - - - - - + + + + + Update all the cells in the [param path] coordinates array so that they use the given [param terrain] for the given [param terrain_set]. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. If [param ignore_empty_terrains] is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. @@ -372,8 +372,8 @@ - - + + Enables or disables the layer [param layer]. A disabled layer is not processed at all (no rendering, no physics, etc...). If [param layer] is negative, the layers are accessed from the last one. @@ -381,8 +381,8 @@ - - + + Sets a layer's color. It will be multiplied by tile's color and LayeredTileMap's modulate. If [param layer] is negative, the layers are accessed from the last one. @@ -390,8 +390,8 @@ - - + + Sets a layer's name. This is mostly useful in the editor. If [param layer] is negative, the layers are accessed from the last one. @@ -399,16 +399,16 @@ - - + + Enables or disables a layer's built-in navigation regions generation. Disable this if you need to bake navigation regions from a LayeredTileMap using a [NavigationRegion2D] node. - - + + Assigns [param map] as a [NavigationServer2D] navigation map for the specified LayeredTileMap layer [param layer]. By default the LayeredTileMap uses the default [World2D] navigation map for the first LayeredTileMap layer. For each additional LayeredTileMap layer a new navigation map is created for the additional layer. @@ -418,8 +418,8 @@ - - + + Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will behave as a CanvasItem node where each of its tile gets Y-sorted. Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behavior. @@ -428,8 +428,8 @@ - - + + Sets a layer's Y-sort origin value. This Y-sort origin value is added to each tile's Y-sort origin value. This allows, for example, to fake a different height level on each layer. This can be useful for top-down view games. @@ -438,8 +438,8 @@ - - + + Sets a layers Z-index value. This Z-index is added to each tile's Z-index value. If [param layer] is negative, the layers are accessed from the last one. @@ -447,17 +447,17 @@ - - + + Assigns [param map] as a [NavigationServer2D] navigation map for the specified LayeredTileMap layer [param layer]. - - - + + + Paste the given [LayeredTileMapPattern] at the given [param position] and [param layer] in the tile map. If [param layer] is negative, the layers are accessed from the last one. diff --git a/modules/layered_tile_map/doc_classes/LayeredTileMapPattern.xml b/modules/layered_tile_map/doc_classes/LayeredTileMapPattern.xml index 4c1f13a14..18ae1b54a 100644 --- a/modules/layered_tile_map/doc_classes/LayeredTileMapPattern.xml +++ b/modules/layered_tile_map/doc_classes/LayeredTileMapPattern.xml @@ -12,21 +12,21 @@ - + Returns the tile alternative ID of the cell at [param coords]. - + Returns the tile atlas coordinates ID of the cell at [param coords]. - + Returns the tile source ID of the cell at [param coords]. @@ -45,7 +45,7 @@ - + Returns whether the pattern has a tile at the given coordinates. @@ -58,25 +58,25 @@ - - + + Remove the cell at the given coordinates. - - - - + + + + Sets the tile identifiers for the cell at coordinates [param coords]. See [method LayeredTileMap.set_cell]. - + Sets the size of the pattern. diff --git a/modules/layered_tile_map/doc_classes/LayeredTileSet.xml b/modules/layered_tile_map/doc_classes/LayeredTileSet.xml index f6bad9644..7a7024ab4 100644 --- a/modules/layered_tile_map/doc_classes/LayeredTileSet.xml +++ b/modules/layered_tile_map/doc_classes/LayeredTileSet.xml @@ -23,7 +23,7 @@ - + Adds a custom data layer to the LayeredTileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Custom data layers allow assigning custom properties to atlas tiles. @@ -31,7 +31,7 @@ - + Adds a navigation layer to the LayeredTileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Navigation layers allow assigning a navigable area to atlas tiles. @@ -39,7 +39,7 @@ - + Adds an occlusion layer to the LayeredTileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Occlusion layers allow assigning occlusion polygons to atlas tiles. @@ -47,15 +47,15 @@ - - + + Adds a [LayeredTileMapPattern] to be stored in the LayeredTileSet resource. If provided, insert it at the given [param index]. - + Adds a physics layer to the LayeredTileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. Physics layers allow assigning collision polygons to atlas tiles. @@ -63,8 +63,8 @@ - - + + Adds a [LayeredTileSetSource] to the LayeredTileSet. If [param atlas_source_id_override] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. The function returns the added source ID or -1 if the source could not be added. @@ -73,15 +73,15 @@ - - + + Adds a new terrain to the given terrain set [param terrain_set] at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. - + Adds a new terrain set at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array. @@ -100,9 +100,9 @@ - - - + + + Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxie's target identifiers (source ID, atlas coords ID and alternative tile ID). If the LayeredTileSet has no proxy for the given identifiers, returns an empty Array. @@ -110,8 +110,8 @@ - - + + Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID). If the LayeredTileSet has no proxy for the given identifiers, returns an empty Array. @@ -119,21 +119,21 @@ - + Returns the index of the custom data layer identified by the given name. - + Returns the name of the custom data layer identified by the given index. - + Returns the type of the custom data layer identified by the given index. @@ -146,15 +146,15 @@ - - + + Returns whether or not the specified navigation layer of the LayeredTileSet navigation data layer identified by the given [param layer_index] is enabled, given a navigation_layers [param layer_number] between 1 and 32. - + Returns the navigation layers (as in the Navigation server) of the given LayeredTileSet navigation layer. @@ -173,14 +173,14 @@ - + Returns the light mask of the occlusion layer. - + Returns if the occluders from this layer use [code]sdf_collision[/code]. @@ -193,7 +193,7 @@ - + Returns the [LayeredTileMapPattern] at the given [param index]. @@ -206,21 +206,21 @@ - + Returns the collision layer (as in the physics server) bodies on the given LayeredTileSet's physics layer are in. - + Returns the collision mask of bodies on the given LayeredTileSet's physics layer. - + Returns the physics material of bodies on the given LayeredTileSet's physics layer. @@ -233,7 +233,7 @@ - + Returns the [LayeredTileSetSource] with ID [param source_id]. @@ -246,14 +246,14 @@ - + Returns the source ID for source with index [param index]. - + Returns the source-level proxy for the given source identifier. If the LayeredTileSet has no proxy for the given identifier, returns -1. @@ -261,23 +261,23 @@ - - + + Returns a terrain's color. - - + + Returns a terrain's name. - + Returns a terrain set mode. @@ -290,47 +290,47 @@ - + Returns the number of terrains in the given terrain set. - - - + + + Returns if there is an alternative-level proxy for the given identifiers. - - + + Returns if there is a coodinates-level proxy for the given identifiers. - + Returns if this LayeredTileSet has a source for the given source ID. - + Returns if there is a source-level proxy for the given source ID. - - - + + + According to the configured proxies, maps the provided identifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies. @@ -339,142 +339,142 @@ - - + + Moves the custom data layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly. - - + + Moves the navigation layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly. - - + + Moves the occlusion layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly. - - + + Moves the physics layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly. - - - + + + Moves the terrain at index [param terrain_index] for terrain set [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly. - - + + Moves the terrain set at index [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly. - - - + + + Removes an alternative-level proxy for the given identifiers. - - + + Removes a coordinates-level proxy for the given identifiers. - + Removes the custom data layer at index [param layer_index]. Also updates the atlas tiles accordingly. - + Removes the navigation layer at index [param layer_index]. Also updates the atlas tiles accordingly. - + Removes the occlusion layer at index [param layer_index]. Also updates the atlas tiles accordingly. - + Remove the [LayeredTileMapPattern] at the given index. - + Removes the physics layer at index [param layer_index]. Also updates the atlas tiles accordingly. - + Removes the source with the given source ID. - + Removes a source-level tile proxy. - - + + Removes the terrain at index [param terrain_index] in the given terrain set [param terrain_set]. Also updates the atlas tiles accordingly. - + Removes the terrain set at index [param terrain_set]. Also updates the atlas tiles accordingly. - - - - - - + + + + + + Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. This can be used to replace a tile in all LayeredTileMaps using this LayeredTileSet, as LayeredTileMap nodes will find and use the proxy's target tile when one is available. @@ -483,10 +483,10 @@ - - - - + + + + Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies. This can be used to replace a tile in all LayeredTileMaps using this LayeredTileSet, as LayeredTileMap nodes will find and use the proxy's target tile when one is available. @@ -495,89 +495,89 @@ - - + + Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error. - - + + Sets the type of the custom data layer identified by the given index. - - - + + + Based on [param value], enables or disables the specified navigation layer of the LayeredTileSet navigation data layer identified by the given [param layer_index], given a navigation_layers [param layer_number] between 1 and 32. - - + + Sets the navigation layers (as in the navigation server) for navigation regions in the given LayeredTileSet navigation layer. - - + + Sets the occlusion layer (as in the rendering server) for occluders in the given LayeredTileSet occlusion layer. - - + + Enables or disables SDF collision for occluders in the given LayeredTileSet occlusion layer. - - + + Sets the physics layer (as in the physics server) for bodies in the given LayeredTileSet physics layer. - - + + Sets the physics layer (as in the physics server) for bodies in the given LayeredTileSet physics layer. - - + + Sets the physics material for bodies in the given LayeredTileSet physics layer. - - + + Changes a source's ID. - - + + Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies. This can be used to replace a source in all LayeredTileMaps using this LayeredTileSet, as LayeredTileMap nodes will find and use the proxy's target source when one is available. @@ -586,26 +586,26 @@ - - - + + + Sets a terrain's color. This color is used for identifying the different terrains in the LayeredTileSet editor. - - - + + + Sets a terrain's name. - - + + Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighboring tiles' terrains. diff --git a/modules/layered_tile_map/doc_classes/LayeredTileSetAtlasSource.xml b/modules/layered_tile_map/doc_classes/LayeredTileSetAtlasSource.xml index 31f67206e..f20968a5c 100644 --- a/modules/layered_tile_map/doc_classes/LayeredTileSetAtlasSource.xml +++ b/modules/layered_tile_map/doc_classes/LayeredTileSetAtlasSource.xml @@ -7,8 +7,8 @@ An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using [method create_tile]. Those tiles are then indexed using their coordinates in the grid. Each tile can also have a size in the grid coordinates, making it more or less cells in the atlas. Alternatives version of a tile can be created using [method create_alternative_tile], which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0. - Each tile alternate has a set of properties that is defined by the source's [LayeredTileSet] layers. Those properties are stored in a TileData object that can be accessed and modified using [method get_tile_data]. - As TileData properties are stored directly in the LayeredTileSetAtlasSource resource, their properties might also be set using [code]LayeredTileSetAtlasSource.set("<coords_x>:<coords_y>/<alternative_id>/<tile_data_property>")[/code]. + Each tile alternate has a set of properties that is defined by the source's [LayeredTileSet] layers. Those properties are stored in a LayeredTileData object that can be accessed and modified using [method get_tile_data]. + As LayeredTileData properties are stored directly in the LayeredTileSetAtlasSource resource, their properties might also be set using [code]LayeredTileSetAtlasSource.set("<coords_x>:<coords_y>/<alternative_id>/<tile_data_property>")[/code]. @@ -21,8 +21,8 @@ - - + + Creates an alternative tile for the tile at coordinates [param atlas_coords]. If [param alternative_id_override] is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise. Returns the new alternative identifier, or -1 if the alternative could not be created with a provided [param alternative_id_override]. @@ -30,8 +30,8 @@ - - + + Creates a new tile at coordinates [param atlas_coords] with the given [param size]. @@ -44,7 +44,7 @@ - + Returns the alternative ID a following call to [method create_alternative_tile] would return. @@ -57,8 +57,8 @@ - - + + Returns the region of the tile at coordinates [param atlas_coords] for the given [param frame] inside the texture returned by [method get_runtime_texture]. [b]Note:[/b] If [member use_texture_padding] is [code]false[/code], returns the same as [method get_tile_texture_region]. @@ -66,102 +66,102 @@ - + Returns how many columns the tile at [param atlas_coords] has in its animation layout. - - + + Returns the animation frame duration of frame [param frame_index] for the tile at coordinates [param atlas_coords]. - + Returns how many animation frames has the tile at coordinates [param atlas_coords]. - + Returns the tile animation mode of the tile at [param atlas_coords]. See also [method set_tile_animation_mode]. - + Returns the separation (as in the atlas grid) between each frame of an animated tile at coordinates [param atlas_coords]. - + Returns the animation speed of the tile at coordinates [param atlas_coords]. - + Returns the sum of the sum of the frame durations of the tile at coordinates [param atlas_coords]. This value needs to be divided by the animation speed to get the actual animation loop duration. - + If there is a tile covering the [param atlas_coords] coordinates, returns the top-left coordinates of the tile (thus its coordinate ID). Returns [code]Vector2i(-1, -1)[/code] otherwise. - - - + + + - Returns the [TileData] object for the given atlas coordinates and alternative ID. + Returns the [LayeredTileData] object for the given atlas coordinates and alternative ID. - + Returns the size of the tile (in the grid coordinates system) at coordinates [param atlas_coords]. - - + + Returns a tile's texture region in the atlas texture. For animated tiles, a [param frame] argument might be provided for the different frames of the animation. - - - - + + + + Returns an array of tiles coordinates ID that will be automatically removed when modifying one or several of those properties: [param texture], [param margins], [param separation] or [param texture_region_size]. This can be used to undo changes that would have caused tiles data loss. - - - - - - + + + + + + Returns whether there is enough room in an atlas to create/modify a tile with the given properties. If [param ignored_tile] is provided, act as is the given tile was not present in the atlas. This may be used when you want to modify a tile's properties. @@ -174,9 +174,9 @@ - - - + + + Move the tile and its alternatives at the [param atlas_coords] coordinates to the [param new_atlas_coords] coordinates with the [param new_size] size. This functions will fail if a tile is already present in the given area. If [param new_atlas_coords] is [code]Vector2i(-1, -1)[/code], keeps the tile's coordinates. If [param new_size] is [code]Vector2i(-1, -1)[/code], keeps the tile's size. @@ -185,8 +185,8 @@ - - + + Remove a tile's alternative with alternative ID [param alternative_tile]. Calling this function with [param alternative_tile] equals to 0 will fail, as the base tile alternative cannot be removed. @@ -194,16 +194,16 @@ - + Remove a tile and its alternative at coordinates [param atlas_coords]. - - - + + + Change a tile's alternative ID from [param alternative_tile] to [param new_id]. Calling this function with [param new_id] of 0 will fail, as the base tile alternative cannot be moved. @@ -211,49 +211,49 @@ - - + + Sets the number of columns in the animation layout of the tile at coordinates [param atlas_coords]. If set to 0, then the different frames of the animation are laid out as a single horizontal line in the atlas. - - - + + + Sets the animation frame [param duration] of frame [param frame_index] for the tile at coordinates [param atlas_coords]. - - + + Sets how many animation frames the tile at coordinates [param atlas_coords] has. - - + + Sets the tile animation mode of the tile at [param atlas_coords] to [param mode]. See also [method get_tile_animation_mode]. - - + + Sets the margin (in grid tiles) between each tile in the animation layout of the tile at coordinates [param atlas_coords] has. - - + + Sets the animation speed of the tile at coordinates [param atlas_coords] has. diff --git a/modules/layered_tile_map/doc_classes/LayeredTileSetScenesCollectionSource.xml b/modules/layered_tile_map/doc_classes/LayeredTileSetScenesCollectionSource.xml index 786db2288..85566956a 100644 --- a/modules/layered_tile_map/doc_classes/LayeredTileSetScenesCollectionSource.xml +++ b/modules/layered_tile_map/doc_classes/LayeredTileSetScenesCollectionSource.xml @@ -12,8 +12,8 @@ - - + + Creates a scene-based tile out of the given scene. Returns a newly generated unique ID. @@ -27,21 +27,21 @@ - + Returns whether the scene tile with [param id] displays a placeholder in the editor. - + Returns the scene tile ID of the scene tile at [param index]. - + Returns the [PackedScene] resource of scene tile with [param id]. @@ -54,38 +54,38 @@ - + Returns whether this LayeredTileSet source has a scene tile with [param id]. - + Remove the scene tile with [param id]. - - + + Sets whether or not the scene tile with [param id] should display a placeholder in the editor. This might be useful for scenes that are not visible. - - + + Changes a scene tile's ID from [param id] to [param new_id]. This will fail if there is already a tile with an ID equal to [param new_id]. - - + + Assigns a [PackedScene] resource to the scene tile with [param id]. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the LayeredTileMap. diff --git a/modules/layered_tile_map/doc_classes/LayeredTileSetSource.xml b/modules/layered_tile_map/doc_classes/LayeredTileSetSource.xml index 10b431937..ce127e10b 100644 --- a/modules/layered_tile_map/doc_classes/LayeredTileSetSource.xml +++ b/modules/layered_tile_map/doc_classes/LayeredTileSetSource.xml @@ -15,15 +15,15 @@ - - + + Returns the alternative ID for the tile with coordinates ID [param atlas_coords] at index [param index]. - + Returns the number of alternatives tiles for the coordinates ID [param atlas_coords]. For [LayeredTileSetAtlasSource], this always return at least 1, as the base tile with ID 0 is always part of the alternatives list. @@ -32,7 +32,7 @@ - + Returns the tile coordinates ID of the tile with index [param index]. @@ -45,15 +45,15 @@ - - + + Returns if the base tile at coordinates [param atlas_coords] has an alternative with ID [param alternative_tile]. - + Returns if this atlas has a tile with coordinates ID [param atlas_coords].