1
0

QuestTab.js 520 B

12345678910111213141516171819202122232425262728
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. bgFrames: [cc.SpriteFrame],
  5. },
  6. onLoad () {
  7. },
  8. init (quest) {
  9. this.quest = quest
  10. },
  11. show () {
  12. this.getComponent(cc.Button).interactable = false;
  13. this.getComponent('cc.Sprite').spriteFrame = this.bgFrames[1]
  14. },
  15. hide () {
  16. this.getComponent(cc.Button).interactable = true;
  17. this.getComponent('cc.Sprite').spriteFrame = this.bgFrames[0]
  18. }
  19. // update (dt) {},
  20. });