Feature/ninja convert tiledmap slopemap takes tilset indices #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Chad—
Thanks for accepting my previous PR. Here is another change that I need but I'm not sure if you want it. Your current version of physics.ninja.convertTiledmap() takes a slopeMap where the keys are indices into your tile map. I have changed it so the indices are for the tileset instead. In other words, the old implementation requires specifying all the slopes for each individual map you write in Tiled. My change assumes that if you use a certain tile from a tileset, that tile will always have the same Ninja slope. I think this is the common usage for tilesets—a tile in the tileset specifies what a tile looks like and it's properties such as collision Ninja slope. This is certainly an API change. If people are expecting the other way, this will break for them. However I suspect this change is what people expect from a slopeMap.
—Winston