summaryrefslogtreecommitdiff
path: root/meta/3rd/Cocos4.0/library/cc/TMXLayer.lua
blob: 718603b91baaf337ad5f3969d5a061b90c19033f (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---@meta

---@class cc.TMXLayer :cc.SpriteBatchNode
local TMXLayer={ }
cc.TMXLayer=TMXLayer




---*  Returns the position in points of a given tile coordinate.<br>
---* param tileCoordinate The tile coordinate.<br>
---* return The position in points of a given tile coordinate.
---@param tileCoordinate vec2_table
---@return vec2_table
function TMXLayer:getPositionAt (tileCoordinate) end
---*  Set layer orientation, which is the same as the map orientation.<br>
---* param orientation Layer orientation,which is the same as the map orientation.
---@param orientation int
---@return self
function TMXLayer:setLayerOrientation (orientation) end
---*  Dealloc the map that contains the tile position from memory.<br>
---* Unless you want to know at runtime the tiles positions, you can safely call this method.<br>
---* If you are going to call layer->tileGIDAt() then, don't release the map.
---@return self
function TMXLayer:releaseMap () end
---*  Size of the layer in tiles.<br>
---* return Size of the layer in tiles.
---@return size_table
function TMXLayer:getLayerSize () end
---*  Set the size of the map's tile.<br>
---* param size The size of the map's tile.
---@param size size_table
---@return self
function TMXLayer:setMapTileSize (size) end
---*  Layer orientation, which is the same as the map orientation.<br>
---* return Layer orientation, which is the same as the map orientation.
---@return int
function TMXLayer:getLayerOrientation () end
---*  Set an Properties from to layer.<br>
---* param properties It is used to set the layer Properties.
---@param properties map_table
---@return self
function TMXLayer:setProperties (properties) end
---*  Set the layer name.<br>
---* param layerName The layer name.
---@param layerName string
---@return self
function TMXLayer:setLayerName (layerName) end
---*  Removes a tile at given tile coordinate. <br>
---* param tileCoordinate The tile coordinate.
---@param tileCoordinate vec2_table
---@return self
function TMXLayer:removeTileAt (tileCoordinate) end
---*  Initializes a TMXLayer with a tileset info, a layer info and a map info.<br>
---* param tilesetInfo An tileset info.<br>
---* param layerInfo A layer info.<br>
---* param mapInfo A map info.<br>
---* return If initializes successfully, it will return true.
---@param tilesetInfo cc.TMXTilesetInfo
---@param layerInfo cc.TMXLayerInfo
---@param mapInfo cc.TMXMapInfo
---@return boolean
function TMXLayer:initWithTilesetInfo (tilesetInfo,layerInfo,mapInfo) end
---*  Creates the tiles. 
---@return self
function TMXLayer:setupTiles () end
---@overload fun(unsigned_int:unsigned_int,vec2_table:vec2_table,int:int):self
---@overload fun(unsigned_int:unsigned_int,vec2_table:vec2_table):self
---@param gid unsigned_int
---@param tileCoordinate vec2_table
---@param flags int
---@return self
function TMXLayer:setTileGID (gid,tileCoordinate,flags) end
---*  Size of the map's tile (could be different from the tile's size).<br>
---* return The size of the map's tile.
---@return size_table
function TMXLayer:getMapTileSize () end
---*  Return the value for the specific property name.<br>
---* param propertyName The specific property name.<br>
---* return Return the value for the specific property name.
---@param propertyName string
---@return cc.Value
function TMXLayer:getProperty (propertyName) end
---*  Set size of the layer in tiles.<br>
---* param size Size of the layer in tiles.
---@param size size_table
---@return self
function TMXLayer:setLayerSize (size) end
---*  Get the layer name. <br>
---* return The layer name.
---@return string
function TMXLayer:getLayerName () end
---*  Set tileset information for the layer.<br>
---* param info The tileset information for the layer.<br>
---* js NA
---@param info cc.TMXTilesetInfo
---@return self
function TMXLayer:setTileSet (info) end
---*  Tileset information for the layer. <br>
---* return Tileset information for the layer.
---@return cc.TMXTilesetInfo
function TMXLayer:getTileSet () end
---@overload fun():self
---@overload fun():self
---@return map_table
function TMXLayer:getProperties () end
---*  Returns the tile (Sprite) at a given a tile coordinate.<br>
---* The returned Sprite will be already added to the TMXLayer. Don't add it again.<br>
---* The Sprite can be treated like any other Sprite: rotated, scaled, translated, opacity, color, etc.<br>
---* You can remove either by calling:<br>
---* - layer->removeChild(sprite, cleanup);<br>
---* - or layer->removeTileAt(Vec2(x,y));<br>
---* param tileCoordinate A tile coordinate.<br>
---* return Returns the tile (Sprite) at a given a tile coordinate.
---@param tileCoordinate vec2_table
---@return cc.Sprite
function TMXLayer:getTileAt (tileCoordinate) end
---*  Creates a TMXLayer with an tileset info, a layer info and a map info.<br>
---* param tilesetInfo An tileset info.<br>
---* param layerInfo A layer info.<br>
---* param mapInfo A map info.<br>
---* return An autorelease object.
---@param tilesetInfo cc.TMXTilesetInfo
---@param layerInfo cc.TMXLayerInfo
---@param mapInfo cc.TMXMapInfo
---@return self
function TMXLayer:create (tilesetInfo,layerInfo,mapInfo) end
---* 
---@param child cc.Node
---@param zOrder int
---@param tag int
---@return self
function TMXLayer:addChild (child,zOrder,tag) end
---* js NA
---@return string
function TMXLayer:getDescription () end
---* 
---@param child cc.Node
---@param cleanup boolean
---@return self
function TMXLayer:removeChild (child,cleanup) end
---* js ctor
---@return self
function TMXLayer:TMXLayer () end