public void tick() {
        if (fps == -1)
            return;

        timer++;
        if (timer > 60 / fps) {
            currentFrame++;
            timer = 0;
        }

        if (currentFrame >= sprites.length)
            currentFrame = 0;
    }