mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 13:12:42 +00:00
Added function "get_tiles_ids" to TreeSet.
This commit is contained in:
parent
891b2bdb4f
commit
ec448845e2
@ -15046,6 +15046,13 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_tiles_ids" qualifiers="const" >
|
||||
<return type="Array">
|
||||
</return>
|
||||
<description>
|
||||
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
|
@ -231,6 +231,17 @@ Array TileSet::_tile_get_shapes(int p_id) const{
|
||||
return arr;
|
||||
}
|
||||
|
||||
Array TileSet::_get_tiles_ids() const{
|
||||
|
||||
Array arr;
|
||||
|
||||
for (Map<int, Data>::Element *E = tile_map.front(); E; E = E->next()) {
|
||||
arr.push_back(E->key());
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
void TileSet::get_tile_list(List<int> *p_tiles) const {
|
||||
|
||||
for(Map<int,Data>::Element *E=tile_map.front();E;E=E->next()) {
|
||||
@ -301,6 +312,7 @@ void TileSet::_bind_methods() {
|
||||
ObjectTypeDB::bind_method(_MD("clear"),&TileSet::clear);
|
||||
ObjectTypeDB::bind_method(_MD("get_last_unused_tile_id"),&TileSet::get_last_unused_tile_id);
|
||||
ObjectTypeDB::bind_method(_MD("find_tile_by_name","name"),&TileSet::find_tile_by_name);
|
||||
ObjectTypeDB::bind_method(_MD("get_tiles_ids", "name"), &TileSet::_get_tiles_ids);
|
||||
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,7 @@ protected:
|
||||
void _get_property_list( List<PropertyInfo> *p_list) const;
|
||||
void _tile_set_shapes(int p_id,const Array& p_shapes);
|
||||
Array _tile_get_shapes(int p_id) const;
|
||||
Array _get_tiles_ids() const;
|
||||
|
||||
static void _bind_methods();
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user