cc.Class({ extends: cc.Component, properties: { bgFrames: [cc.SpriteFrame], iconFrames: [cc.SpriteFrame], icon: cc.Node, arrow: cc.Node, text: cc.Node }, onLoad () { }, init (quest) { this.quest = quest }, show () { this.getComponent('cc.Sprite').spriteFrame = this.bgFrames[1] this.icon.getComponent('cc.Sprite').spriteFrame = this.iconFrames[1] this.icon.y = 35 this.text.y = -17 this.arrow.active = true }, hide () { this.getComponent('cc.Sprite').spriteFrame = this.bgFrames[0] this.icon.getComponent('cc.Sprite').spriteFrame = this.iconFrames[0] this.icon.y = 12 this.text.y = -30 this.arrow.active = false } // update (dt) {}, });