public void update(long deltaMs) {
        onCurrentFrame += deltaMs;
        
        if(onCurrentFrame >= frameDelay) {
            currentFrame++;
            currentFrame %= frames.size();
            onCurrentFrame = 0;
        }
    }