public void setCurrentFrameID(String id) {
        int i = 0;
        for (TextureFrame tex : textures) {
            if (tex.id.equals(id)) {
                break;
            }
            i++;
        }
        if (animationType == EnumAnimationType.STATE_RENDERED && i < textures.length) {
            TextureFrame frame = textures[i];
            if (frame != null) {
                currentTexture = i;
            }
        }
    }