StealViewSuccess.js 436 B

12345678910111213141516171819202122
  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(context) {
  14. let { amount } = context;
  15. this.amount.string = "总共收获" + Number(amount).toFixed(3) + "个果实";
  16. },
  17. onClose() {
  18. this.node.destroy();
  19. },
  20. });