import global from 'global'
const {ccclass, property} = cc._decorator;

@ccclass
export default class num extends cc.Component {

    // use this for initialization
    onLoad () {
        global.starNum = JSON.parse(cc.sys.localStorage.getItem('starNum')) || 0
        this.RT = this.node.getComponent(cc.RichText)
    }

    update (dt) {
        this.RT.string = '<outline color=#1b1b1b width=3>'+ global.starNum + '</outline>'
    }
}
