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