Closed piotr-j closed 8 years ago
I guess you need this to generate the tree file from your editor, right?
Yep, I can do without it, but it would be cleaner like that.
2015-10-21 1:35 GMT+02:00 davebaol notifications@github.com:
I guess you need this to generate the tree file from your editor, right?
— Reply to this email directly or view it on GitHub https://github.com/libgdx/gdx-ai/pull/48#issuecomment-149735123.
TBH I've mixed feelings about this.
On the one hand I see why you want it and I recognize it can be cleaner, on the other hand distributions are general purpose classes that have nothing to do with behavior trees and their syntax.
However, XXXDistribution
classes already have a static parse method that creates instances of subclasses. :scream:
I'd really like a better design. Any ideas?
I agree, its not the best as is. But i don't really see how to do this in much better way. Perhaps separate class for parsing/stringing. It sure would be nice if we could have generic primitives.
E: Speaking of saving trees, take a look if you have a sec BehaviorTreeSaver
Looks good to me!
Added
toParsableString
in variousDistribution
s to facilitate generation of parseable trees from in memoryBehaviourTree