Add ability to bind typed arrays to script API
Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells Note: Will do a mass replace on later PRs of whathever I can find, but probably need a tool to grep through doc. Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
This commit is contained in:
parent
7343ec13d9
commit
5d4dc2d45c
24 changed files with 452 additions and 10 deletions
|
|
@ -1691,14 +1691,14 @@ bool TileMap::is_centered_textures_enabled() const {
|
|||
return centered_textures;
|
||||
}
|
||||
|
||||
Array TileMap::get_used_cells() const {
|
||||
TypedArray<Vector2i> TileMap::get_used_cells() const {
|
||||
|
||||
Array a;
|
||||
TypedArray<Vector2i> a;
|
||||
a.resize(tile_map.size());
|
||||
int i = 0;
|
||||
for (Map<PosKey, Cell>::Element *E = tile_map.front(); E; E = E->next()) {
|
||||
|
||||
Vector2 p(E->key().x, E->key().y);
|
||||
Vector2i p(E->key().x, E->key().y);
|
||||
a[i++] = p;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue