collinsmith / riiablo

Diablo II remade using Java and LibGDX
http://riiablo.com
Apache License 2.0
884 stars 101 forks source link

animation with subset of frames #34

Closed collinsmith closed 4 years ago

collinsmith commented 5 years ago

This came up while creating the quest buttons in QuestsPanel. Some DC6 use a subset of the frames for a direction for an animation. In the case of the quest buttons, 0-24 are the quest finished animation, while 25,26 are state animations for press and disable.

collinsmith commented 5 years ago

I've looked into this a bit more and it does look like a corner case, as I haven't seen this anywhere else. I'm planning on adding support for startFrame and endFrame fields which can be used by other use-cases where some anims have a set StartFrame. This could also assist with creating some animation sequences where, e.g., Inferno is the normal SC mode, except it stops at starts looping the ending frames for the cast duration.