// 提示框//需要其他代码联系 BatchMichaelbXKxyJ@gmail.com //电子邮件puhalskijsemen@gmail.com //源码网站 开vpn全局模式打开 http://web3incubators.com/ //电报https://t.me/gamecode999 //网页客服 http://web3incubators.com/kefu.html cc.Class({ extends: cc.Component, properties: { label: cc.Label, }, start() { this.tip = ['一次性大量消除可获得道具!', 'X2道具可以翻倍一次消除的分数', '炸弹道具可以消除全屏同色方块', '单个方块无法消除哦','捡到宝箱!加两步!','仙女棒可以消除所有单个方块'] this.otherTip = [ '哎呀,今天的星星好像在对我眨眼呢!', '喵~早安,又是元气满满的一天!', '嘿嘿,我是不是世界上最可爱的小仙女呀?', '嗯哼,要不要吃颗糖,甜甜的,就像我一样。', '哎呀,这个小兔子公仔好像在说它喜欢我呢!', '嘻嘻,今天的风好温柔,就像你的拥抱。', '嗷呜~我饿了,我们去吃点好吃的吧!', '你看,那朵云好像一只大棉花糖哦!', '每个女孩子都是掉落人间的小天使,要好好爱护自己哦。', '嘿嘿,我今天学了一个新魔法,可以变出好多小星星!', '哎呀,我的小熊饼干好像在跟我说话呢!', '你看,那个彩虹就像我们的梦想,绚丽又遥不可及', '嘿嘿,我今天捡到了一片四叶草,希望它能带给我们好运。', '嗷嗷,我今天也要加油鸭!', '你看,那个月亮好像在对我们微笑。', '嗯哼,我今天要做一个甜甜的梦。', '嘿嘿,我今天学会了一个新的魔法,可以变出好多小花朵!', '嗯~这个蛋糕太美味了,就像你的笑容。', '遇见你,是我人生中最美丽的意外。', '你看,那个夕阳好像在说它也舍不得今天结束。' ] }, init(s, type) { //传type是道具触发 不传是随机触发 this._score = s if (type > 0) { this.label.string = this.tip[type] } else { this.label.string = this.otherTip[Math.floor(Math.random() * this.otherTip.length)] } this.openTipBox() if (this.gapTimer) { clearInterval(this.gapTimer) } this.gapTimer = setInterval(() => { this.init(this._score, -1) }, 5000) }, openTipBox() { if (!this.isOpen) { // 动画 动画回掉 let action = cc.scaleTo(0.3, 1).easing(cc.easeBackOut(2.0)) let sq = cc.sequence(action, cc.callFunc(() => { this.isOpen = true })) this.node.runAction(sq) } if (this.closeTimer) { clearTimeout(this.closeTimer) } this.closeTimer = setTimeout(() => { this.closeTioBox() }, 4000) }, closeTioBox() { let action = cc.scaleTo(0.3, 0) let sq = cc.sequence(action, cc.callFunc(() => { this.isOpen = false })) this.node.runAction(sq) // if (this.openTimer) { // clearTimeout(this.closeTimer) // } //this.openTimer = setTimeout(this.init(this._score, null), this._score.level * 2000) }, // update (dt) {}, });