

cc.Class({
    extends: cc.Component,

    properties: {
        content: cc.Node,

        item: cc.Prefab,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {},

    start () {

    },

    init(starData) {
        let buyGold = starData.buyGold;
        let starTypeCount = starData.starTypeCount;
        let userStars = starData.userStars;
        for(let i = 0; i < userStars.length; ++i) {
            let starItem = cc.instantiate(this.item);
            starItem.getComponent('StarItem').init(userStars[i], buyGold, starTypeCount);
            this.content.addChild(starItem);
        }
    }
    // update (dt) {},
});
