/**
 * 选项，图片
 */

cc.Class({
    extends: cc.Component,

    properties: {
        // 图片
        pic: {
            default: null,
            type: cc.Sprite,
        },

        _opId: 0, // 选项id
    },

    setPic(url) {
        cc.loader.load({ url }, (err, img) => {
            const spriteFrame = new cc.SpriteFrame(img);
            this.pic.spriteFrame = spriteFrame;
        });
    },
});
