Skip to content
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

Implement MapObjectSerializer #156

Merged
merged 3 commits into from Aug 5, 2018
Merged

Implement MapObjectSerializer #156

merged 3 commits into from Aug 5, 2018

Conversation

steffen-wilke
Copy link
Contributor

This implementation uses the TmxProperty annotation and reflection to determine which fields of the IEntity implementation need to be serialized to a custom property of the MapObject.
Replaced the CustomMapObjectProperty annotation by the TmxProperty annotation. This new annotation is defined on the actual field which is more practical.
Also this annotation directly links the field to a key value for custom properties. Previously this was a very loose connection and one had to know the related field.

Annotated all currently implemented custom properties for the engine's default entity types with the TmxProperty annotation.
This will also allow to further automate the MapObjectLoaders in the long run.

Implement a unit test that ensures that the MapObjectSerializer works properly.
Rename some MapObjectProperty constants to better reflect their use case.

Closes #66

This implementation uses the TmxProperty annotation and reflection to determine which fields of the IEntity implementation need to be serialized to a custom property of the MapObject.
Replaced the CustomMapObjectProperty annotation by the TmxProperty annotation. This new annotation is defined on the actual field which is more practical.
Also this annotation directly links the field to a key value for custom properties. Previously this was a very loose connection and one had to know the related field.

Annotated all currently implemented custom properties for the engine's default entity types with the TmxProperty annotation.
This will also allow to further automate the MapObjectLoaders in the long run.

Implement a unit test that ensures that the MapObjectSerializer works properly.
Rename some MapObjectProperty constants to better reflect their use case.

Closes #66
@steffen-wilke
Copy link
Contributor Author

Don't know why this build fails at that one test on the pr build only. The push build works without any issue and also locally the tests can be executed without any issue. Guess I'll merge and see if the issue still occurs.

@steffen-wilke steffen-wilke merged commit 66a62ee into master Aug 5, 2018
@steffen-wilke steffen-wilke deleted the mapobject-property branch August 5, 2018 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant