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

//原点已是中心
export class IceAni extends Ani {
    /**
     * 图片
     */
    showImage: FYGE.FrameAni;
    constructor() {
        super();
        this.aniName = RecoverName.ICE_ANI// "IceAni";
        var arr = []
        arr.push(RES.getRes("ele" + ElementType.ICE + ".png"))
        for (var i = 2; i <= 6; i++)arr.push(RES.getRes("ice" + i + ".png"))
        this.showImage = new FYGE.FrameAni(arr);
        this.addChild(this.showImage)
    }

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