| 123456789101112131415161718192021222324252627282930 |
- import { _decorator, Component, Node, Label } from 'cc';
- const { ccclass, property } = _decorator;
- @ccclass('BonusLogItem')
- export class BonusLogItem extends Component {
- @property({ type: Label, tooltip: "玩家名字" })
- nameLabel: Label;
- @property({ type: Label, tooltip: "时间" })
- timeLabel: Label;
- start() {
- }
- public setData(data: { name: string, time: string }) {
- this.nameLabel.string = data.name;
- this.timeLabel.string = data.time;
- }
- }
- /**
- * [1] Class member could be defined like this.
- * [2] Use `property` decorator if your want the member to be serializable.
- * [3] Your initialization goes here.
- * [4] Your update function goes here.
- *
- * Learn more about scripting: https://docs.cocos.com/creator/3.0/manual/en/scripting/
- * Learn more about CCClass: https://docs.cocos.com/creator/3.0/manual/en/scripting/ccclass.html
- * Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.0/manual/en/scripting/life-cycle-callbacks.html
- */
|