public Animation(int type, int start, int finish) {
        if (type == 1) {
            Game.p.setCF(start);
            cf = Game.p.getCF();
            x = Game.p.getX();
            y = Game.p.getY();
            tempX = (int) Game.AnimationRectPLAYER1.getX();
            tempY = (int) Game.AnimationRectPLAYER1.getY();
        } else if (type == 2) {
            Game.p.setCF2(start);
            cf = Game.p.getCF2();
            x = Game.p.getX2();
            y = Game.p.getY2();
            tempX = (int) Game.AnimationRectPLAYER2.getX();
            tempY = (int) Game.AnimationRectPLAYER2.getY();
        } else if (type == 3) {
            Game.boss.setCF(start);
            cf = Game.boss.getCF();
            x = Game.boss.getX();
            y = (int) Game.boss.gety();
            tempX = (int) Game.AnimationRectBOSS.getX();
            tempY = (int) Game.AnimationRectBOSS.getY();
        }
        this.type = type;
        Animation = true;
        fin = finish;
        this.start = start;
        time = new Timer(50, this);
        runs = 0;
        time.start();
    }