var Utils = require("Utils") cc.Class({ extends: cc.Component, properties: { lb_name: { default: null, type: cc.Label }, sp_head: { default: null, type: cc.Sprite }, }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start() { Utils.setitem(this, cc.playerData.nowheroid, this.sp_head) this.lb_name.string = cc.playerData.name }, // update (dt) {}, });