1
0

SkillMask.js 793 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. const AlertManager = require('../utils/AlertManager');
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. caishenSkeleton: sp.Skeleton,
  6. hongyundangtouSkeleton: sp.Skeleton,
  7. content: cc.Node
  8. },
  9. // LIFE-CYCLE CALLBACKS:
  10. onLoad () {
  11. this._isShow = false;
  12. this.content.height = cc.view.getVisibleSize().height;
  13. },
  14. show() {
  15. this.caishenSkeleton.setCompleteListener(() => {
  16. this.caishenSkeleton.setAnimation(0, 'run', false);
  17. this.node.destroy();
  18. });
  19. if (!this._isShow) {
  20. this._isShow = true;
  21. cc.find('Canvas').addChild(this.node);
  22. } else {
  23. this.node.active = true;
  24. }
  25. },
  26. start () {
  27. },
  28. // update (dt) {},
  29. });