ArtistReportSuccess.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. const DWTool = require("../utils/DWTool");
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. tempNode: cc.Node,
  6. shineSprite: cc.Sprite,
  7. countLabel: cc.RichText
  8. },
  9. init(count) {
  10. this.countLabel.string = `<img src='alert_coin'/><color=#584A47> ${DWTool.coinParse(count)}</c>`;
  11. },
  12. // LIFE-CYCLE CALLBACKS:
  13. onLoad () {
  14. },
  15. start() {
  16. let finish = cc.callFunc(() => {
  17. this.shineSprite.node.runAction(cc.rotateBy(0.8, 100, 100).repeatForever())
  18. }, this);
  19. this.tempNode.scaleX = 0;
  20. this.tempNode.scaleY = 0;
  21. let sequence = cc.sequence(cc.scaleTo(0.35, 1, 1).easing(cc.easeBackOut()), finish);
  22. this.tempNode.runAction(sequence);
  23. },
  24. dissmiss() {
  25. let finish = cc.callFunc(() => {
  26. this.node.destroy();
  27. }, this);
  28. let sequence = cc.sequence(cc.scaleTo(0.2, 0, 0).easing(cc.easeBackIn()), finish)
  29. this.tempNode.runAction(sequence);
  30. },
  31. close() {
  32. this.dissmiss();
  33. },
  34. });