12345678910111213141516171819202122232425262728293031323334353637 |
- 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=#ffb401 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) {},
- });
|