added PolygonRegionLoader for the AssetManager#1602
Merged
badlogic merged 5 commits intolibgdx:masterfrom Apr 9, 2014
dermetfan:master
Merged
added PolygonRegionLoader for the AssetManager#1602badlogic merged 5 commits intolibgdx:masterfrom dermetfan:master
badlogic merged 5 commits intolibgdx:masterfrom
dermetfan:master
Conversation
Contributor
Author
There was a problem hiding this comment.
replaced with TimeUtils for platform compatibility
… caused confusion
Member
There was a problem hiding this comment.
please don't refactor things like this, the original author may have a reason to use curlies, also, if and for on the same line is really bad form.
happy to merge jf you fix these changes.
Contributor
Author
|
Ok @badlogic, the changes in total should be minimal now. Sorry for the commit mess. |
badlogic
added a commit
that referenced
this pull request
Apr 9, 2014
added PolygonRegionLoader for the AssetManager
Member
|
Cool, thanks! |
Member
|
Why does this wrap the existing PolygonRegionLoader? Why not just make the existing loader a proper AssetLoader? |
Member
|
Good point. The wrapping is OK, letting the loader implement AssetLoader would be even better. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I felt like it may be useful, so I added the PolygonRegionLoader from libgdx-utils. I also added it to the default loaders of the AssetManager in its constructor.
The PolygonRegionLoader uses the com.badlogic.gdx.graphics.g2d.PolygonRegionLoader but is an AssetLoader. The line starting with "i " (can be configured using PolygonRegionParameters) in PSH files is used to figure out which Texture it depends on. If that line does not exist, a sibling of the PSH file with the same name and an image file name extension (like "png", "jpeg", ... can be configured) is searched.