In my game, an object accumulates force to jump, the animation consists of 12 frames, with each frame the object is flattened, the holding time affects the force of the jump.
How can I control the number of frames played? For example, if you have accumulated the maximum force of a jump, then the animation is played in full; if you press and release, then only, for example, the first two or three frames.
I play the jump animation through tilesource, where start tile 1 and end tile 12, playback once forward.