public void act(){
        if (show){
            if (counter >= 2){
                counter = 0;
                frame++;
                if (frame > maxFrame){
                    frame = 1;
                }
                this.setImage (cache[frame-1]);
            }
            else{
                counter++;
            }
        }else{
            this.setImage (bg);
        }
    }