StealViewFail.js 401 B

123456789101112131415161718192021
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. /**
  5. * 收入显示
  6. */
  7. amount: {
  8. default: null,
  9. type: cc.Label,
  10. serializable: true,
  11. },
  12. },
  13. setInfo(amount) {
  14. this.amount.string = "总共收获" + Number(amount).toFixed(3) + "个果实";
  15. },
  16. onClose() {
  17. this.node.destroy();
  18. },
  19. });