DrJamgo / Godot_LPC_Spritesheet_Gen

Other
14 stars 7 forks source link

AnimationTree support #2

Open andreas-volz opened 1 year ago

andreas-volz commented 1 year ago

My game has a statemachine controller with AnimationTree based on an AnimationPlayer. This doesn't work with the LPCSprite Node as this is based on AnimatedSprite.

I suggest to provide an optional AnimationPlayer node with all animations wrapped and the dir and anim property keys.

grafik

andreas-volz commented 1 year ago

I made a first implementation in a forked branch to support wrapping in AnimationPlayer and AnimationTree: https://github.com/andreas-volz/Godot_LPC_Spritesheet_Gen It works really nice and simple. I didn't add my complete example code as it is embed in more code. Need to extract a minimal demo. It just hooks into lpc_sprite.gd with minimal changes to your code base. Maybe the direction handling could be improved to match your codes concept. Please tell me if you like it and need a minimal demo code than I'll create one.

DrJamgo commented 1 year ago

Hi Andreas,

thanks for your contribution, I do think it is a great alternative. Can you please provide a demo scene in the ddmo folder so people see the intended use and outline it in the readme?

You can just open a PR and we can finish it.

andreas-volz commented 1 year ago

Sure, I'll prepare the code and then inform you.