import MovieClip from "../../physics/movieclip/MovieClip";
import LabelType from "../LabelType";

const createCandy2 = (scale) => {
    //气泡纹理种气泡的尺寸默认100（总体还包含气泡周围的阴影效果）
    const texture = RES.getRes('candy2_json') as egret.SpriteSheet;
    const animation = createMovieClip(texture, 98 / 137 * scale);
    return animation
}

const createMovieClip = (spritesheet: egret.SpriteSheet, scale = 1) => {
    const list = ['礼盒0000', '礼盒0001', '礼盒0002', '礼盒0003', '礼盒0004', '礼盒0005', '礼盒0006',
        '礼盒0007', '礼盒0008', '礼盒0009', '礼盒0010', '礼盒0011', '礼盒0012', '礼盒0013', '礼盒0014', '礼盒0015'];
    const movieclip = new MovieClip({
        spritesheet: spritesheet,
        frameInterval: 4,
        frames: list,
        position: [0, 0],
        scale: scale,
        anchor: [199 / 500, 244 / 500]
    });
    movieclip.lable = LabelType.Candy2
    return movieclip
}

export default createCandy2