I feel like this logic could be moved to the animation component and animation system. The main reason I say this is, I see you are keeping track of timeElapsed in the spritesheet. But what if two entities are using the same spritesheet, but need different animations.