12345678910111213141516171819202122232425262728293031323334353637383940 |
- cc.Class({
- extends: cc.Component,
- properties: {
- score: cc.Label,
- },
- init (game) {
- this.game = game;
- this.shareFlag = 0;
- },
- show () {
- this.node.active = true;
- this.getComponent(cc.Animation).play();
- this.score.string = this.game.inGameUI.score;
- },
- hide () {
- this.node.active = false;
- this.node.y = 700;
- },
- doShare () {
- this.shareFlag = 1;
- this.game.doShare();
- wx.onShow(res => {
- if(this.shareFlag == 1) {
- this.hide();
- this.game.gameContinue();
- this.shareFlag = 0;
- }
- })
- },
- start () {
- },
- });
|