
const DWTool = require("../utils/DWTool");
cc.Class({
    extends: cc.Component,

    properties: {
        ///背景图
        bgNode: cc.Sprite,
        /// 明星图像
        starIcon: cc.Sprite,

    },

    init(backgroudId, propId = 0) {
        this.loadBackGroud(backgroudId);
    },

    loadBackGroud(backgroudId) {
        let path = './textures/draw/bg0' + (backgroudId + 1);
        DWTool.loadResSpriteFrame(path)
        .then((spriteFrame) => {
            this.bgNode.spriteFrame = spriteFrame;
        });
    },

    // LIFE-CYCLE CALLBACKS:
    onLoad () {
    },

    start () {

    },

});
