libgdx / gdx-ai

Artificial Intelligence framework for games based on libGDX or not. Features: Steering Behaviors, Formation Motion, Pathfinding, Behavior Trees and Finite State Machines
Apache License 2.0
1.18k stars 241 forks source link

allow unsupported type parsing for task attributes #87

Closed mgsx-dev closed 7 years ago

mgsx-dev commented 7 years ago

These changes allow custom behavior tree parser to support types that are not supported in default parser.

One of my use case is to allow Interpolation (gdx.math) type for some task attributes. Since there is several ways to parse such type, I think it's better to let developers subclass default parser and implement it as they want.

Interpolation could be handled like this :

There might be better solution inspired by JSON.Serializer (distribution parsing could be implemented in serializer as well) but it implies more changes and maybe some drawbacks.

What do you think ?

davebaol commented 7 years ago

Merged. Thanks!