1234567891011121314151617181920212223242526272829303132333435363738 |
- cc.Class({
- extends: cc.Component,
- properties: {
- bgFrames: [cc.SpriteFrame],
- titleRichText: cc.RichText,
- tabText: '好友排行'
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- start () {
- },
- init () {
- },
- show () {
- this.getComponent(cc.Button).interactable = false;
- this.getComponent('cc.Sprite').spriteFrame = this.bgFrames[1];
- this.titleRichText.string = `<b><outline color=#ffae00 width=2><color=white>${this.tabText}</color></outline></b>`;
- },
- hide () {
- this.getComponent(cc.Button).interactable = true;
- this.getComponent('cc.Sprite').spriteFrame = this.bgFrames[0];
- this.titleRichText.string = `<b><color=#B6896B>${this.tabText}</color></b>`;
- }
- // update (dt) {},
- });
|