alextrevisan / LPCAnimatedSprite2D

With this addon you simply add a LPC spritesheet to a character and it automaticly generates the animations for the Godot4 sprites
MIT License
45 stars 6 forks source link

WIP Directionality function addition. #22

Closed Loufe closed 3 months ago

Loufe commented 10 months ago

WIP, not yet tested.

This PR aims to add the ability to supply a "type" of animation as well as a Vector2 rather than the entire animation name, as an option.

How it accomplishes it:

Play command modified to be as flexible as possible:

Some notes with the PR.

Let me know your thoughts.

Hopefully will have an hour tonight to do some required changes.

alextrevisan commented 10 months ago

Just for simplification, all Vector2 can be one of:

Vector2.UP Vector2.DOWN Vector2.LEFT Vector2.RIGHT

They are just constants for the vector, but I think the code will be clearer. What do yout think?

Loufe commented 10 months ago

Just for simplification, all Vector2 can be one of:

Vector2.UP Vector2.DOWN Vector2.LEFT Vector2.RIGHT

They are just constants for the vector, but I think the code will be clearer. What do yout think?

I'm learning a little more every day 😅 great point. We can clean it up in the precompiled branch later on.

Are you ok with adding those parameters to LPCSpriteData ?

Loufe commented 10 months ago

With latest commit this is working on my end. Already makes code in my project (adjustments for testing) a lot cleaner.

@alextrevisan , If you have time to test and review I'd appreciate it.

Loufe commented 3 months ago

I'll try again soon with a fresh PR, no use keeping this old base one alive.