Skyloh / project-beat

A winter-break project to create a framework for an arcade-style beat-em-up.
0 stars 0 forks source link

Implement means of storing hitbox/hurtbox/sequence data apart from AnimationClips. #3

Open Skyloh opened 11 months ago

Skyloh commented 11 months ago

AnimationEvents are nice, but they're wholly bound to the clip they're on. If you want to reuse animations w/ new anim events, you have to make completely new clips.

Think of a way to separate this information. Here are some brainstorms:

Skyloh commented 11 months ago

The AnimatorStateMachine states seem like a really, really good option. They can be serialized, they're easy to use, the whole shebang. There even is a method on Animator to get all Behaviors of a type! I can use that to grab all the behaviours to hook them to stuff. Only issue is minor; they all have the exact same name when serialized:

If the script name is SampleScript and I serialized 3 different versions, they all look like (SampleScript), (SampleScript), (SampleScript).