ArtistReportSuccess.js 773 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. const DWTool = require("../utils/DWTool");
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. content: cc.Node,
  6. countLabel: cc.Label
  7. },
  8. init(count) {
  9. this.countLabel.string = DWTool.coinParse(count);
  10. },
  11. // LIFE-CYCLE CALLBACKS:
  12. onLoad () {
  13. },
  14. start() {
  15. this.content.scaleX = 0;
  16. this.content.scaleY = 0;
  17. this.content.runAction(cc.scaleTo(0.35, 1, 1).easing(cc.easeBackOut()));
  18. },
  19. dissmiss() {
  20. let finish = cc.callFunc(() => {
  21. this.node.destroy();
  22. }, this);
  23. let sequence = cc.sequence(cc.scaleTo(0.2, 0, 0).easing(cc.easeBackIn()), finish)
  24. this.content.runAction(sequence);
  25. },
  26. close() {
  27. this.dissmiss();
  28. },
  29. });