RedPoinAnim.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. var t = require;
  2. var e = module;
  3. var i = exports;
  4. var s =
  5. (this && this.__decorate) ||
  6. function(t, e, i, s) {
  7. var o,
  8. a = arguments.length,
  9. n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s;
  10. if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s);
  11. else
  12. for (var r = t.length - 1; 0 <= r; r--)
  13. (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n);
  14. return 3 < a && n && Object.defineProperty(e, i, n), n;
  15. };
  16. Object.defineProperty(i, "__esModule", { value: !0 }), (i.RedPoinAnim = void 0);
  17. const { ccclass: o, menu: a } = cc._decorator;
  18. (e = class extends cc.Component {
  19. onEnable() {
  20. this.playAni();
  21. }
  22. onDisable() {
  23. this.node.stopAllActions();
  24. }
  25. playAni() {
  26. this.node.stopAllActions();
  27. var t = cc.tween(this.node).to(0.3, { angle: 20 }).to(0.3, { angle: -20 }),
  28. t = cc
  29. .tween(this.node)
  30. .to(0.2, { scale: 1.1 })
  31. .repeat(5, t)
  32. .to(0, { angle: 0 })
  33. .to(0.2, { scale: 1.2 })
  34. .to(0.2, { scale: 1 })
  35. .delay(3);
  36. cc.tween(this.node).repeatForever(t).start();
  37. }
  38. }),
  39. (e = s([o], e));
  40. i.RedPoinAnim = e;