StarGetStarAlert.js 673 B

1234567891011121314151617181920212223242526272829303132
  1. const GameModule = require("../utils/GameModule");
  2. const ArtistManager = require('../utils/ArtistManager');
  3. cc.Class({
  4. extends: cc.Component,
  5. properties: {
  6. iconSprite: cc.Sprite,
  7. starLabel: cc.Label,
  8. descRichText: cc.RichText
  9. },
  10. // LIFE-CYCLE CALLBACKS:
  11. // onLoad () {},
  12. start () {
  13. },
  14. initGetStar(imageId, name, desc) {
  15. ArtistManager.loadStarAvatarSpriteFrame(imageId, this.iconSprite);
  16. this.starLabel.string = name;
  17. this.descRichText.string = desc;
  18. },
  19. sureAction() {
  20. GameModule.audioMng.playClickButton();
  21. this.node.destroy();
  22. }
  23. // update (dt) {},
  24. });