| 12345678910111213141516171819202122 |
- cc.Class({
- extends: cc.Component,
- properties: {
- /**
- * 收入显示
- */
- amount: {
- default: null,
- type: cc.Label,
- serializable: true,
- },
- },
- setInfo(context) {
- let { amount } = context;
- this.amount.string = "总共收获" + Number(amount).toFixed(3) + "个果实";
- },
- onClose() {
- this.node.destroy();
- },
- });
|