You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is what it does according to the official documentation:
//Scans the given area for tiles with an index matching tileA and swaps them with tileB. swap(tileA,tileB,x,y,width,height,layer);
And this is from the examples
// This will swap every instance of tile 30 (empty ground) with tile 31 (the cactus plant), it also does the opposite,// so tile 31 (cactus plants) will become empty ground (tile 30). It does this across the whole layer of the map.map.swap(30,31);
What it actually does is neither. It just turns every instance of tileB it finds into tileA.
I think this was changed in #544 and probably many people have coded their games expecting this behavior, so maybe it's easier to just change the docs.
However, I think it was working correctly before #544, or at least I find the previous behavior very useful in some cases, so it would be nice to have another function using the old swap() behavior.
The text was updated successfully, but these errors were encountered:
This is what it does according to the official documentation:
And this is from the examples
What it actually does is neither. It just turns every instance of tileB it finds into tileA.
I think this was changed in #544 and probably many people have coded their games expecting this behavior, so maybe it's easier to just change the docs.
However, I think it was working correctly before #544, or at least I find the previous behavior very useful in some cases, so it would be nice to have another function using the old swap() behavior.
The text was updated successfully, but these errors were encountered: