0.2.0-dev Download ZIP
85 lines ·3.0 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="TileMapPattern" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> |
| 3 | <brief_description> |
| 4 | Holds a pattern to be copied from or pasted into [TileMap]s. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | This resource holds a set of cells to help bulk manipulations of [TileMap]. |
| 8 | A pattern always starts at the [code](0, 0)[/code] coordinates and cannot have cells with negative coordinates. |
| 9 | </description> |
| 10 | <tutorials> |
| 11 | </tutorials> |
| 12 | <methods> |
| 13 | <method name="get_cell_alternative_tile" qualifiers="const"> |
| 14 | <return type="int" /> |
| 15 | <param index="0" name="coords" type="Vector2i" /> |
| 16 | <description> |
| 17 | Returns the tile alternative ID of the cell at [param coords]. |
| 18 | </description> |
| 19 | </method> |
| 20 | <method name="get_cell_atlas_coords" qualifiers="const"> |
| 21 | <return type="Vector2i" /> |
| 22 | <param index="0" name="coords" type="Vector2i" /> |
| 23 | <description> |
| 24 | Returns the tile atlas coordinates ID of the cell at [param coords]. |
| 25 | </description> |
| 26 | </method> |
| 27 | <method name="get_cell_source_id" qualifiers="const"> |
| 28 | <return type="int" /> |
| 29 | <param index="0" name="coords" type="Vector2i" /> |
| 30 | <description> |
| 31 | Returns the tile source ID of the cell at [param coords]. |
| 32 | </description> |
| 33 | </method> |
| 34 | <method name="get_size" qualifiers="const"> |
| 35 | <return type="Vector2i" /> |
| 36 | <description> |
| 37 | Returns the size, in cells, of the pattern. |
| 38 | </description> |
| 39 | </method> |
| 40 | <method name="get_used_cells" qualifiers="const"> |
| 41 | <return type="Vector2i[]" /> |
| 42 | <description> |
| 43 | Returns the list of used cell coordinates in the pattern. |
| 44 | </description> |
| 45 | </method> |
| 46 | <method name="has_cell" qualifiers="const"> |
| 47 | <return type="bool" /> |
| 48 | <param index="0" name="coords" type="Vector2i" /> |
| 49 | <description> |
| 50 | Returns whether the pattern has a tile at the given coordinates. |
| 51 | </description> |
| 52 | </method> |
| 53 | <method name="is_empty" qualifiers="const"> |
| 54 | <return type="bool" /> |
| 55 | <description> |
| 56 | Returns whether the pattern is empty or not. |
| 57 | </description> |
| 58 | </method> |
| 59 | <method name="remove_cell"> |
| 60 | <return type="void" /> |
| 61 | <param index="0" name="coords" type="Vector2i" /> |
| 62 | <param index="1" name="update_size" type="bool" /> |
| 63 | <description> |
| 64 | Remove the cell at the given coordinates. |
| 65 | </description> |
| 66 | </method> |
| 67 | <method name="set_cell"> |
| 68 | <return type="void" /> |
| 69 | <param index="0" name="coords" type="Vector2i" /> |
| 70 | <param index="1" name="source_id" type="int" default="-1" /> |
| 71 | <param index="2" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" /> |
| 72 | <param index="3" name="alternative_tile" type="int" default="-1" /> |
| 73 | <description> |
| 74 | Sets the tile identifiers for the cell at coordinates [param coords]. See [method TileMap.set_cell]. |
| 75 | </description> |
| 76 | </method> |
| 77 | <method name="set_size"> |
| 78 | <return type="void" /> |
| 79 | <param index="0" name="size" type="Vector2i" /> |
| 80 | <description> |
| 81 | Sets the size of the pattern. |
| 82 | </description> |
| 83 | </method> |
| 84 | </methods> |
| 85 | </class> |