Just a general question: Is there a specific reason why the AnimationStateListener is an abstract class instead of an interface?
I think it would be much more usefull as an interface. I have a lot of entities and components in my game and in almost all cases where events would be useful, these classes are already part of some depth of inheritance. Being able to implement a listener interface seems to be a cleaner solution in general, than being stuck with some kind of helper class in all of these objects.
I don't want to spawn a lengthy abstract class vs. interface discussion at this point. Just converted it to an interface for my game and my experience was, that it made a lot of code easier/cleaner and I couldn't come up with any good example where an abstract class would be absolutely needed.
Maybe you could just provide both, like libGDX does for the GestureListener/GestureAdapter for example.
ページ 1 ／ 1
- 記事: 7
Agreed, an interface is nicer. Committed!
- 記事: 9730
Great! What I love most about Spine is how my custom runtime tinkering stuff has a half-life period of about, uh, a few hours. Which makes upgrading the runtime at a later point sooooooo much easier
- 記事: 7
Mark topic unread • ページ 1 ／ 1
Return to Runtimes