Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Decouple Animator from PlayerMovementController #55

Open
ErikOverflow opened this issue Apr 22, 2019 · 0 comments
Open

Decouple Animator from PlayerMovementController #55

ErikOverflow opened this issue Apr 22, 2019 · 0 comments

Comments

@ErikOverflow
Copy link
Owner

ErikOverflow commented Apr 22, 2019

Is your feature request related to a problem? Please describe.
Yes, if you would like to migrate the movement controller to a new project, you would also need to migrate the animator and its parameters as well. The player's movement should be agnostic of the animation, especially knowing that we may implement the DragonBones or Spine runtimes, or Unity's 2D Animation package.

Describe the solution you'd like
Create a generic PlayerMovementController class with virtual methods for Jump() and RunDirection(Vector2 dir) that can be based and overridden to trigger specific animator implementations.

Describe alternatives you've considered
Expose subscribable events that a second script can listen to and trigger animator actions from.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant