import { Ani } from "../class/Ani";
import { RecoverName } from "../enum/RecoverName";
import { RES } from "../../../module/RES";

//原点已是中心
export class BoomAni extends Ani {
    /**
     * 图片
     */
    showImage: FYGE.FrameAni;
    constructor() {
        super();
        this.aniName = RecoverName.BOOM_ANI;
        var arr: FYGE.Texture[] = []
        for (var i = 0; i <= 20; i++) {
            arr.push(RES.getRes("boom" + i + ".png"));
        }
        this.showImage = new FYGE.FrameAni(arr);
        this.addChild(this.showImage);
    }

    play() {
        //重置图片
        this.showImage.reset(0);
        this.showImage.play(1, () => {
            this.recover();
        })
    }
} 