-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tilemap.removeTile
etc operations don't modify plus.tileAnimations
#4
Comments
You seem to have a good grasp of the code already! :) As you figured out yourself, the system builds a structure that keeps track of the animated tiles. If you are confident you can submit a PR, please do go ahead! I think we should also look at other layer modification code besides removeTile(..). |
Yup, I mentioned "swap", "randomize" etc above.
But yeah, nothing trivial in those 2... Damn... Would be a whole lot easier if it were the |
Yeah, it would have been easier if it was encapsulated in each tile somehow. Also, when I initially coded the animation system, I didn't give much thought to map modification once it was loaded. I'll tackle this in the next update. |
I realize this is a nice-to-have, but would make using animations more plug-and-play:
When calling
this.tilemap.removeTile(x, y, layer)
(or "swap", "randomize", etc...), the correspondingthis.tilemap.plus.tileAnimations[*].tileLocations[*]
doesn't get "corrected".I've currently got a crude external approach:
But would be sweet to have
removeTile
patched to remove "anytileLocations
at given coordinates wheretileAnimations
'frames
containsindex
".And while typing this, I just realized that I could just as well override
TileMap.prototype.removeTile
and make this less clunky...Maybe I'll send along a PR 😜
The text was updated successfully, but these errors were encountered: