mirror of
https://github.com/Leo501/CocosCreatorTutorial.git
synced 2026-05-12 17:16:16 +08:00
26 lines
470 B
JavaScript
26 lines
470 B
JavaScript
const timeUtil = require('TimeUtil');
|
|
cc.Class({
|
|
extends: cc.Component,
|
|
|
|
properties: {
|
|
timeLabel: cc.Label,
|
|
nameLabel: cc.Label,
|
|
contextLabel: cc.Label
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
},
|
|
|
|
init(data) {
|
|
this.contextLabel.node.active = false;
|
|
this.timeLabel.string = timeUtil.timeString(new Date());
|
|
this.nameLabel.string = data.name + ' : ' + data.msg;
|
|
}
|
|
|
|
// start () {
|
|
|
|
// },
|
|
|
|
// update (dt) {},
|
|
}); |