Commit 45ea2a0a authored by Edwise's avatar Edwise 🍷

保存

parent 5df4ddde
...@@ -2323,7 +2323,7 @@ var Ins = (function () { ...@@ -2323,7 +2323,7 @@ var Ins = (function () {
var seconds = Math.round(leave3 / 1000); var seconds = Math.round(leave3 / 1000);
return minutes + "分" + seconds + "秒"; return minutes + "分" + seconds + "秒";
}; };
Ins.recoverEnergy = 1 * 60 * 1000; Ins.recoverEnergy = 10 * 60 * 1000;
Ins.salmonArr = []; Ins.salmonArr = [];
return Ins; return Ins;
}()); }());
...@@ -2844,12 +2844,14 @@ var Cat = (function (_super) { ...@@ -2844,12 +2844,14 @@ var Cat = (function (_super) {
setInterval(function () { setInterval(function () {
if (_this.curActIndex != 0 && _this.curActIndex != 1) if (_this.curActIndex != 0 && _this.curActIndex != 1)
return; return;
if (!Ins_1.Ins.senceInfo.bubbleTips)
return;
var tips = Ins_1.Ins.senceInfo.bubbleTips; var tips = Ins_1.Ins.senceInfo.bubbleTips;
if (tips && tips.length > 0) { if (tips && tips.length > 0) {
_this.curBubbleTipIndex = (_this.curBubbleTipIndex + 1) > (tips.length - 1) ? 0 : _this.curBubbleTipIndex + 1; _this.curBubbleTipIndex = (_this.curBubbleTipIndex + 1) > (tips.length - 1) ? 0 : _this.curBubbleTipIndex + 1;
_this.showDialog(1, tips[_this.curBubbleTipIndex], true); _this.showDialog(1, tips[_this.curBubbleTipIndex], true);
} }
}, 4000); }, 12000);
}, 6000); }, 6000);
}; };
Cat.prototype.touchCat = function () { Cat.prototype.touchCat = function () {
...@@ -2857,6 +2859,8 @@ var Cat = (function (_super) { ...@@ -2857,6 +2859,8 @@ var Cat = (function (_super) {
if (this.curActIndex != 0 && this.curActIndex != 1) if (this.curActIndex != 0 && this.curActIndex != 1)
return; return;
console.log("点击猫咪"); console.log("点击猫咪");
if (!Ins_1.Ins.senceInfo.clickBubble)
return;
var tipsArr = Ins_1.Ins.senceInfo.clickBubble; var tipsArr = Ins_1.Ins.senceInfo.clickBubble;
var index = Math.floor(Math.random() * tipsArr.length); var index = Math.floor(Math.random() * tipsArr.length);
this.showDialog(5, tipsArr[index]); this.showDialog(5, tipsArr[index]);
...@@ -47459,8 +47463,10 @@ var MainScene = (function (_super) { ...@@ -47459,8 +47463,10 @@ var MainScene = (function (_super) {
that.tlBtn.mouseEnable = true; that.tlBtn.mouseEnable = true;
that.tlGroup.addChild(that.tlBtn); that.tlGroup.addChild(that.tlBtn);
that.tlTips1 = Ins_1.Ins.initSprite("c246aaf3-84bc-4f26-ae81-f2311d25be7b", 200, -25); that.tlTips1 = Ins_1.Ins.initSprite("c246aaf3-84bc-4f26-ae81-f2311d25be7b", 200, -25);
that.tlTips1.mouseEnable = true;
that.tlGroup.addChild(that.tlTips1); that.tlGroup.addChild(that.tlTips1);
that.tlTips2 = Ins_1.Ins.initSprite("b8959848-40a2-48b6-a0f0-b2311e9e9ec2", 140, -25); that.tlTips2 = Ins_1.Ins.initSprite("b8959848-40a2-48b6-a0f0-b2311e9e9ec2", 140, -25);
that.tlTips2.mouseEnable = true;
that.tlGroup.addChild(that.tlTips2); that.tlGroup.addChild(that.tlTips2);
}; };
MainScene.prototype.initMxqBtnGroup = function () { MainScene.prototype.initMxqBtnGroup = function () {
...@@ -47473,8 +47479,10 @@ var MainScene = (function (_super) { ...@@ -47473,8 +47479,10 @@ var MainScene = (function (_super) {
that.mxqBtn.mouseEnable = true; that.mxqBtn.mouseEnable = true;
that.mxqGroup.addChild(that.mxqBtn); that.mxqGroup.addChild(that.mxqBtn);
that.mxqTips1 = Ins_1.Ins.initSprite("5fe3d0ec-043f-4337-bcbe-e191fe933e92", 35, -50); that.mxqTips1 = Ins_1.Ins.initSprite("5fe3d0ec-043f-4337-bcbe-e191fe933e92", 35, -50);
that.mxqTips1.mouseEnable = true;
that.mxqGroup.addChild(that.mxqTips1); that.mxqGroup.addChild(that.mxqTips1);
that.mxqTips2 = Ins_1.Ins.initSprite("0dc71764-0d52-41e2-baa2-53a787db892b", -20, -50); that.mxqTips2 = Ins_1.Ins.initSprite("0dc71764-0d52-41e2-baa2-53a787db892b", -20, -50);
that.mxqTips2.mouseEnable = true;
that.mxqGroup.addChild(that.mxqTips2); that.mxqGroup.addChild(that.mxqTips2);
if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) { if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) {
that.tlGroup.visible = true; that.tlGroup.visible = true;
...@@ -47958,7 +47966,11 @@ var MainScene = (function (_super) { ...@@ -47958,7 +47966,11 @@ var MainScene = (function (_super) {
var that = this; var that = this;
console.log("主场景添加事件"); console.log("主场景添加事件");
that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that); that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips1.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips2.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that); that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips1.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips2.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.letter && that.letter.addEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that); that.letter && that.letter.addEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that); FYGE.GDispatcher.addEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that); FYGE.GDispatcher.addEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that);
...@@ -47975,7 +47987,11 @@ var MainScene = (function (_super) { ...@@ -47975,7 +47987,11 @@ var MainScene = (function (_super) {
console.log("主场景移除事件"); console.log("主场景移除事件");
that.recoverEnergyHandler && clearInterval(that.recoverEnergyHandler); that.recoverEnergyHandler && clearInterval(that.recoverEnergyHandler);
that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that); that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips1.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips2.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that); that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips1.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips2.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.letter && that.letter.removeEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that); that.letter && that.letter.removeEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that); FYGE.GDispatcher.removeEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that); FYGE.GDispatcher.removeEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that);
This diff is collapsed.
...@@ -2325,7 +2325,7 @@ var Ins = (function () { ...@@ -2325,7 +2325,7 @@ var Ins = (function () {
var seconds = Math.round(leave3 / 1000); var seconds = Math.round(leave3 / 1000);
return minutes + "分" + seconds + "秒"; return minutes + "分" + seconds + "秒";
}; };
Ins.recoverEnergy = 1 * 60 * 1000; Ins.recoverEnergy = 10 * 60 * 1000;
Ins.salmonArr = []; Ins.salmonArr = [];
return Ins; return Ins;
}()); }());
...@@ -2846,12 +2846,14 @@ var Cat = (function (_super) { ...@@ -2846,12 +2846,14 @@ var Cat = (function (_super) {
setInterval(function () { setInterval(function () {
if (_this.curActIndex != 0 && _this.curActIndex != 1) if (_this.curActIndex != 0 && _this.curActIndex != 1)
return; return;
if (!Ins_1.Ins.senceInfo.bubbleTips)
return;
var tips = Ins_1.Ins.senceInfo.bubbleTips; var tips = Ins_1.Ins.senceInfo.bubbleTips;
if (tips && tips.length > 0) { if (tips && tips.length > 0) {
_this.curBubbleTipIndex = (_this.curBubbleTipIndex + 1) > (tips.length - 1) ? 0 : _this.curBubbleTipIndex + 1; _this.curBubbleTipIndex = (_this.curBubbleTipIndex + 1) > (tips.length - 1) ? 0 : _this.curBubbleTipIndex + 1;
_this.showDialog(1, tips[_this.curBubbleTipIndex], true); _this.showDialog(1, tips[_this.curBubbleTipIndex], true);
} }
}, 4000); }, 12000);
}, 6000); }, 6000);
}; };
Cat.prototype.touchCat = function () { Cat.prototype.touchCat = function () {
...@@ -2859,6 +2861,8 @@ var Cat = (function (_super) { ...@@ -2859,6 +2861,8 @@ var Cat = (function (_super) {
if (this.curActIndex != 0 && this.curActIndex != 1) if (this.curActIndex != 0 && this.curActIndex != 1)
return; return;
console.log("点击猫咪"); console.log("点击猫咪");
if (!Ins_1.Ins.senceInfo.clickBubble)
return;
var tipsArr = Ins_1.Ins.senceInfo.clickBubble; var tipsArr = Ins_1.Ins.senceInfo.clickBubble;
var index = Math.floor(Math.random() * tipsArr.length); var index = Math.floor(Math.random() * tipsArr.length);
this.showDialog(5, tipsArr[index]); this.showDialog(5, tipsArr[index]);
...@@ -47461,8 +47465,10 @@ var MainScene = (function (_super) { ...@@ -47461,8 +47465,10 @@ var MainScene = (function (_super) {
that.tlBtn.mouseEnable = true; that.tlBtn.mouseEnable = true;
that.tlGroup.addChild(that.tlBtn); that.tlGroup.addChild(that.tlBtn);
that.tlTips1 = Ins_1.Ins.initSprite("c246aaf3-84bc-4f26-ae81-f2311d25be7b", 200, -25); that.tlTips1 = Ins_1.Ins.initSprite("c246aaf3-84bc-4f26-ae81-f2311d25be7b", 200, -25);
that.tlTips1.mouseEnable = true;
that.tlGroup.addChild(that.tlTips1); that.tlGroup.addChild(that.tlTips1);
that.tlTips2 = Ins_1.Ins.initSprite("b8959848-40a2-48b6-a0f0-b2311e9e9ec2", 140, -25); that.tlTips2 = Ins_1.Ins.initSprite("b8959848-40a2-48b6-a0f0-b2311e9e9ec2", 140, -25);
that.tlTips2.mouseEnable = true;
that.tlGroup.addChild(that.tlTips2); that.tlGroup.addChild(that.tlTips2);
}; };
MainScene.prototype.initMxqBtnGroup = function () { MainScene.prototype.initMxqBtnGroup = function () {
...@@ -47475,8 +47481,10 @@ var MainScene = (function (_super) { ...@@ -47475,8 +47481,10 @@ var MainScene = (function (_super) {
that.mxqBtn.mouseEnable = true; that.mxqBtn.mouseEnable = true;
that.mxqGroup.addChild(that.mxqBtn); that.mxqGroup.addChild(that.mxqBtn);
that.mxqTips1 = Ins_1.Ins.initSprite("5fe3d0ec-043f-4337-bcbe-e191fe933e92", 35, -50); that.mxqTips1 = Ins_1.Ins.initSprite("5fe3d0ec-043f-4337-bcbe-e191fe933e92", 35, -50);
that.mxqTips1.mouseEnable = true;
that.mxqGroup.addChild(that.mxqTips1); that.mxqGroup.addChild(that.mxqTips1);
that.mxqTips2 = Ins_1.Ins.initSprite("0dc71764-0d52-41e2-baa2-53a787db892b", -20, -50); that.mxqTips2 = Ins_1.Ins.initSprite("0dc71764-0d52-41e2-baa2-53a787db892b", -20, -50);
that.mxqTips2.mouseEnable = true;
that.mxqGroup.addChild(that.mxqTips2); that.mxqGroup.addChild(that.mxqTips2);
if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) { if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) {
that.tlGroup.visible = true; that.tlGroup.visible = true;
...@@ -47960,7 +47968,11 @@ var MainScene = (function (_super) { ...@@ -47960,7 +47968,11 @@ var MainScene = (function (_super) {
var that = this; var that = this;
console.log("主场景添加事件"); console.log("主场景添加事件");
that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that); that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips1.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips2.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that); that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips1.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips2.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.letter && that.letter.addEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that); that.letter && that.letter.addEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that); FYGE.GDispatcher.addEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that); FYGE.GDispatcher.addEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that);
...@@ -47977,7 +47989,11 @@ var MainScene = (function (_super) { ...@@ -47977,7 +47989,11 @@ var MainScene = (function (_super) {
console.log("主场景移除事件"); console.log("主场景移除事件");
that.recoverEnergyHandler && clearInterval(that.recoverEnergyHandler); that.recoverEnergyHandler && clearInterval(that.recoverEnergyHandler);
that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that); that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips1.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips2.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that); that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips1.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips2.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.letter && that.letter.removeEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that); that.letter && that.letter.removeEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that); FYGE.GDispatcher.removeEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that); FYGE.GDispatcher.removeEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that);
...@@ -20,7 +20,7 @@ export class Ins { ...@@ -20,7 +20,7 @@ export class Ins {
public static curScene:SCENETYPE; public static curScene:SCENETYPE;
/**多长时间恢复精力(ms) */ /**多长时间恢复精力(ms) */
public static recoverEnergy:number = 1*60*1000; public static recoverEnergy:number = 10*60*1000;
/**当前游戏中的三文鱼 */ /**当前游戏中的三文鱼 */
public static salmonArr:Salmon[] = []; public static salmonArr:Salmon[] = [];
......
...@@ -191,12 +191,13 @@ export class Cat extends Module { ...@@ -191,12 +191,13 @@ export class Cat extends Module {
setTimeout(() => { setTimeout(() => {
setInterval(() => { setInterval(() => {
if (this.curActIndex != 0 && this.curActIndex != 1) return; if (this.curActIndex != 0 && this.curActIndex != 1) return;
if(!Ins.senceInfo.bubbleTips)return;
let tips = Ins.senceInfo.bubbleTips; let tips = Ins.senceInfo.bubbleTips;
if (tips && tips.length > 0) { if (tips && tips.length > 0) {
this.curBubbleTipIndex = (this.curBubbleTipIndex + 1) > (tips.length - 1) ? 0 : this.curBubbleTipIndex + 1; this.curBubbleTipIndex = (this.curBubbleTipIndex + 1) > (tips.length - 1) ? 0 : this.curBubbleTipIndex + 1;
this.showDialog(1, tips[this.curBubbleTipIndex], true); this.showDialog(1, tips[this.curBubbleTipIndex], true);
} }
}, 4000) }, 12000)
}, 6000) }, 6000)
} }
...@@ -204,6 +205,7 @@ export class Cat extends Module { ...@@ -204,6 +205,7 @@ export class Cat extends Module {
touchCat() { touchCat() {
if (this.curActIndex != 0 && this.curActIndex != 1) return; if (this.curActIndex != 0 && this.curActIndex != 1) return;
console.log("点击猫咪") console.log("点击猫咪")
if(!Ins.senceInfo.clickBubble) return;
var tipsArr = Ins.senceInfo.clickBubble; var tipsArr = Ins.senceInfo.clickBubble;
var index = Math.floor(Math.random() * tipsArr.length) var index = Math.floor(Math.random() * tipsArr.length)
this.showDialog(5,tipsArr[index]) this.showDialog(5,tipsArr[index])
......
...@@ -172,9 +172,11 @@ export class MainScene extends Scene { ...@@ -172,9 +172,11 @@ export class MainScene extends Scene {
that.tlGroup.addChild(that.tlBtn); that.tlGroup.addChild(that.tlBtn);
//台历tips不在教室初始化 //台历tips不在教室初始化
that.tlTips1 = Ins.initSprite("c246aaf3-84bc-4f26-ae81-f2311d25be7b", 200, -25); that.tlTips1 = Ins.initSprite("c246aaf3-84bc-4f26-ae81-f2311d25be7b", 200, -25);
that.tlTips1.mouseEnable = true;
that.tlGroup.addChild(that.tlTips1); that.tlGroup.addChild(that.tlTips1);
//台历tips在教室初始化 //台历tips在教室初始化
that.tlTips2 = Ins.initSprite("b8959848-40a2-48b6-a0f0-b2311e9e9ec2", 140, -25); that.tlTips2 = Ins.initSprite("b8959848-40a2-48b6-a0f0-b2311e9e9ec2", 140, -25);
that.tlTips2.mouseEnable = true;
that.tlGroup.addChild(that.tlTips2); that.tlGroup.addChild(that.tlTips2);
} }
...@@ -192,9 +194,11 @@ export class MainScene extends Scene { ...@@ -192,9 +194,11 @@ export class MainScene extends Scene {
that.mxqGroup.addChild(that.mxqBtn); that.mxqGroup.addChild(that.mxqBtn);
//毛线球tips不在操场初始化 //毛线球tips不在操场初始化
that.mxqTips1 = Ins.initSprite("5fe3d0ec-043f-4337-bcbe-e191fe933e92", 35, -50); that.mxqTips1 = Ins.initSprite("5fe3d0ec-043f-4337-bcbe-e191fe933e92", 35, -50);
that.mxqTips1.mouseEnable = true;
that.mxqGroup.addChild(that.mxqTips1); that.mxqGroup.addChild(that.mxqTips1);
//毛线球tips在操场初始化 //毛线球tips在操场初始化
that.mxqTips2 = Ins.initSprite("0dc71764-0d52-41e2-baa2-53a787db892b", -20, -50); that.mxqTips2 = Ins.initSprite("0dc71764-0d52-41e2-baa2-53a787db892b", -20, -50);
that.mxqTips2.mouseEnable = true;
that.mxqGroup.addChild(that.mxqTips2); that.mxqGroup.addChild(that.mxqTips2);
if (Ins.curScene == SCENETYPE.BEADROOM || Ins.curScene == 4) { if (Ins.curScene == SCENETYPE.BEADROOM || Ins.curScene == 4) {
...@@ -412,13 +416,13 @@ export class MainScene extends Scene { ...@@ -412,13 +416,13 @@ export class MainScene extends Scene {
if (s) { if (s) {
that.recoverEnergyTime = Ins.recoverEnergy; that.recoverEnergyTime = Ins.recoverEnergy;
console.log("设置恢复时间", that.recoverEnergyTime) console.log("设置恢复时间", that.recoverEnergyTime)
let energyList = r.data.energyList; let energyList = r.data.energyList;
that.initSalmon(energyList); that.initSalmon(energyList);
// if (r.data.energy != Ins.userInfo.energy) { // if (r.data.energy != Ins.userInfo.energy) {
Ins.userInfo.energy = r.data.energy; Ins.userInfo.energy = r.data.energy;
// that.recoverEnergyTime = Ins.recoverEnergy; // that.recoverEnergyTime = Ins.recoverEnergy;
// console.log("设置恢复时间",that.recoverEnergyTime) // console.log("设置恢复时间",that.recoverEnergyTime)
that.setEnergy(); that.setEnergy();
return; return;
// } else { // } else {
// if (r.data.energy != Ins.userInfo.energyMax) { // if (r.data.energy != Ins.userInfo.energyMax) {
...@@ -745,7 +749,13 @@ export class MainScene extends Scene { ...@@ -745,7 +749,13 @@ export class MainScene extends Scene {
var that = this; var that = this;
console.log("主场景添加事件") console.log("主场景添加事件")
that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.CLASSROOM) }, that); that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.CLASSROOM) }, that);
that.tlTips1.addEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.CLASSROOM) }, that);
that.tlTips2.addEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.CLASSROOM) }, that);
that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.PLAYGROUND) }, that); that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.PLAYGROUND) }, that);
that.mxqTips1.addEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.PLAYGROUND) }, that);
that.mxqTips2.addEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.PLAYGROUND) }, that);
that.letter && that.letter.addEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that); that.letter && that.letter.addEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that);
FYGE.GDispatcher.addEventListener(MSG.CHANGE_SCENE, () => { that.changeMainScene(SCENETYPE.BEADROOM) }, that); FYGE.GDispatcher.addEventListener(MSG.CHANGE_SCENE, () => { that.changeMainScene(SCENETYPE.BEADROOM) }, that);
FYGE.GDispatcher.addEventListener(MSG.UPDATE_ENERGY, (data) => { that.updateEnergy(data) }, that) FYGE.GDispatcher.addEventListener(MSG.UPDATE_ENERGY, (data) => { that.updateEnergy(data) }, that)
...@@ -762,8 +772,15 @@ export class MainScene extends Scene { ...@@ -762,8 +772,15 @@ export class MainScene extends Scene {
var that = this; var that = this;
console.log("主场景移除事件") console.log("主场景移除事件")
that.recoverEnergyHandler && clearInterval(that.recoverEnergyHandler); that.recoverEnergyHandler && clearInterval(that.recoverEnergyHandler);
that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.CLASSROOM) }, that); that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.CLASSROOM) }, that);
that.tlTips1.removeEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.CLASSROOM) }, that);
that.tlTips2.removeEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.CLASSROOM) }, that);
that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.PLAYGROUND) }, that); that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.PLAYGROUND) }, that);
that.mxqTips1.removeEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.PLAYGROUND) }, that);
that.mxqTips2.removeEventListener(FYGE.MouseEvent.CLICK, () => { that.changeMainScene(SCENETYPE.PLAYGROUND) }, that);
that.letter && that.letter.removeEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that); that.letter && that.letter.removeEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that);
FYGE.GDispatcher.removeEventListener(MSG.CHANGE_SCENE, () => { that.changeMainScene(SCENETYPE.BEADROOM) }, that); FYGE.GDispatcher.removeEventListener(MSG.CHANGE_SCENE, () => { that.changeMainScene(SCENETYPE.BEADROOM) }, that);
FYGE.GDispatcher.removeEventListener(MSG.UPDATE_ENERGY, (data) => { that.updateEnergy(data) }, that) FYGE.GDispatcher.removeEventListener(MSG.UPDATE_ENERGY, (data) => { that.updateEnergy(data) }, that)
......
import cloud from '@tbmp/mp-cloud-sdk'; import cloud from '@tbmp/mp-cloud-sdk';
import tbcc from './tbcc-sdk'; import tbcc from './tbcc-sdk';
const env = 'test' // 云函数环境 test 测试环境 online 线上环境 const env = 'online' // 云函数环境 test 测试环境 online 线上环境
cloud.init({ cloud.init({
env: env env: env
}); });
...@@ -29,10 +29,10 @@ App({ ...@@ -29,10 +29,10 @@ App({
const { activityId } = query; const { activityId } = query;
// this.activityId = activityId || '5f81841def5071b132fd5e21'; //赵然 // this.activityId = activityId || '5f81841def5071b132fd5e21'; //赵然
// this.activityId = activityId || '5f8022919da671f3b6d5fb14'; //小婷1 // this.activityId = activityId || '5f8022919da671f3b6d5fb14'; //小婷1
// this.activityId = activityId || '5f8d47218e6a0888fc426fad'; //小婷2zhengshi this.activityId = activityId || '5f8d47218e6a0888fc426fad'; //小婷2zhengshi
// this.activityId = activityId || '5f87e8a29897b4e0ce0ada02'; //ceshi // this.activityId = activityId || '5f87e8a29897b4e0ce0ada02'; //ceshi
// this.activityId = activityId || '5fd42308c3ad34a8ccdeb141'; //迭代v2赵然测试1 // this.activityId = activityId || '5fd42308c3ad34a8ccdeb141'; //迭代v2赵然测试1
this.activityId = activityId || '5fd48529964f9752747927f4'; //迭代v2赵然测试2 // this.activityId = activityId || '5fd48529964f9752747927f4'; //迭代v2赵然测试2
} }
......
<view class="shop"> <view class="shop">
<view class="shop-page" style="{{{'background':`url(${resList['e2616129-e292-4333-b107-98c102328165'].url}) no-repeat center top/cover`}}}"> <view class="shop-page" style="{{{'background':`url(${resList['e2616129-e292-4333-b107-98c102328165'].url}) no-repeat center top/cover`}}}">
<!-- <view class="shop_gold_div"> --> <view class="shop_gold_div">
<label class="shop_gold">{{happyCoin}}</label> <label class="shop_gold">{{happyCoin}}</label>
<!-- </view> --> </view>
<image a:if={{false}} class="shop_backbtn" src={{resList['bdab9777-8a4d-4659-ba23-66aaddb7fa5b'].url}} /> <image a:if={{false}} class="shop_backbtn" src={{resList['bdab9777-8a4d-4659-ba23-66aaddb7fa5b'].url}} />
<view class="shop-wrap"> <view class="shop-wrap">
......
...@@ -2325,7 +2325,7 @@ var Ins = (function () { ...@@ -2325,7 +2325,7 @@ var Ins = (function () {
var seconds = Math.round(leave3 / 1000); var seconds = Math.round(leave3 / 1000);
return minutes + "分" + seconds + "秒"; return minutes + "分" + seconds + "秒";
}; };
Ins.recoverEnergy = 1 * 60 * 1000; Ins.recoverEnergy = 10 * 60 * 1000;
Ins.salmonArr = []; Ins.salmonArr = [];
return Ins; return Ins;
}()); }());
...@@ -2846,12 +2846,14 @@ var Cat = (function (_super) { ...@@ -2846,12 +2846,14 @@ var Cat = (function (_super) {
setInterval(function () { setInterval(function () {
if (_this.curActIndex != 0 && _this.curActIndex != 1) if (_this.curActIndex != 0 && _this.curActIndex != 1)
return; return;
if (!Ins_1.Ins.senceInfo.bubbleTips)
return;
var tips = Ins_1.Ins.senceInfo.bubbleTips; var tips = Ins_1.Ins.senceInfo.bubbleTips;
if (tips && tips.length > 0) { if (tips && tips.length > 0) {
_this.curBubbleTipIndex = (_this.curBubbleTipIndex + 1) > (tips.length - 1) ? 0 : _this.curBubbleTipIndex + 1; _this.curBubbleTipIndex = (_this.curBubbleTipIndex + 1) > (tips.length - 1) ? 0 : _this.curBubbleTipIndex + 1;
_this.showDialog(1, tips[_this.curBubbleTipIndex], true); _this.showDialog(1, tips[_this.curBubbleTipIndex], true);
} }
}, 4000); }, 12000);
}, 6000); }, 6000);
}; };
Cat.prototype.touchCat = function () { Cat.prototype.touchCat = function () {
...@@ -2859,6 +2861,8 @@ var Cat = (function (_super) { ...@@ -2859,6 +2861,8 @@ var Cat = (function (_super) {
if (this.curActIndex != 0 && this.curActIndex != 1) if (this.curActIndex != 0 && this.curActIndex != 1)
return; return;
console.log("点击猫咪"); console.log("点击猫咪");
if (!Ins_1.Ins.senceInfo.clickBubble)
return;
var tipsArr = Ins_1.Ins.senceInfo.clickBubble; var tipsArr = Ins_1.Ins.senceInfo.clickBubble;
var index = Math.floor(Math.random() * tipsArr.length); var index = Math.floor(Math.random() * tipsArr.length);
this.showDialog(5, tipsArr[index]); this.showDialog(5, tipsArr[index]);
...@@ -47461,8 +47465,10 @@ var MainScene = (function (_super) { ...@@ -47461,8 +47465,10 @@ var MainScene = (function (_super) {
that.tlBtn.mouseEnable = true; that.tlBtn.mouseEnable = true;
that.tlGroup.addChild(that.tlBtn); that.tlGroup.addChild(that.tlBtn);
that.tlTips1 = Ins_1.Ins.initSprite("c246aaf3-84bc-4f26-ae81-f2311d25be7b", 200, -25); that.tlTips1 = Ins_1.Ins.initSprite("c246aaf3-84bc-4f26-ae81-f2311d25be7b", 200, -25);
that.tlTips1.mouseEnable = true;
that.tlGroup.addChild(that.tlTips1); that.tlGroup.addChild(that.tlTips1);
that.tlTips2 = Ins_1.Ins.initSprite("b8959848-40a2-48b6-a0f0-b2311e9e9ec2", 140, -25); that.tlTips2 = Ins_1.Ins.initSprite("b8959848-40a2-48b6-a0f0-b2311e9e9ec2", 140, -25);
that.tlTips2.mouseEnable = true;
that.tlGroup.addChild(that.tlTips2); that.tlGroup.addChild(that.tlTips2);
}; };
MainScene.prototype.initMxqBtnGroup = function () { MainScene.prototype.initMxqBtnGroup = function () {
...@@ -47475,8 +47481,10 @@ var MainScene = (function (_super) { ...@@ -47475,8 +47481,10 @@ var MainScene = (function (_super) {
that.mxqBtn.mouseEnable = true; that.mxqBtn.mouseEnable = true;
that.mxqGroup.addChild(that.mxqBtn); that.mxqGroup.addChild(that.mxqBtn);
that.mxqTips1 = Ins_1.Ins.initSprite("5fe3d0ec-043f-4337-bcbe-e191fe933e92", 35, -50); that.mxqTips1 = Ins_1.Ins.initSprite("5fe3d0ec-043f-4337-bcbe-e191fe933e92", 35, -50);
that.mxqTips1.mouseEnable = true;
that.mxqGroup.addChild(that.mxqTips1); that.mxqGroup.addChild(that.mxqTips1);
that.mxqTips2 = Ins_1.Ins.initSprite("0dc71764-0d52-41e2-baa2-53a787db892b", -20, -50); that.mxqTips2 = Ins_1.Ins.initSprite("0dc71764-0d52-41e2-baa2-53a787db892b", -20, -50);
that.mxqTips2.mouseEnable = true;
that.mxqGroup.addChild(that.mxqTips2); that.mxqGroup.addChild(that.mxqTips2);
if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) { if (Ins_1.Ins.curScene == Enum_1.SCENETYPE.BEADROOM || Ins_1.Ins.curScene == 4) {
that.tlGroup.visible = true; that.tlGroup.visible = true;
...@@ -47960,7 +47968,11 @@ var MainScene = (function (_super) { ...@@ -47960,7 +47968,11 @@ var MainScene = (function (_super) {
var that = this; var that = this;
console.log("主场景添加事件"); console.log("主场景添加事件");
that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that); that.tlBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips1.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips2.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that); that.mxqBtn.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips1.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips2.addEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.letter && that.letter.addEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that); that.letter && that.letter.addEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that); FYGE.GDispatcher.addEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that);
FYGE.GDispatcher.addEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that); FYGE.GDispatcher.addEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that);
...@@ -47977,7 +47989,11 @@ var MainScene = (function (_super) { ...@@ -47977,7 +47989,11 @@ var MainScene = (function (_super) {
console.log("主场景移除事件"); console.log("主场景移除事件");
that.recoverEnergyHandler && clearInterval(that.recoverEnergyHandler); that.recoverEnergyHandler && clearInterval(that.recoverEnergyHandler);
that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that); that.tlBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips1.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.tlTips2.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.CLASSROOM); }, that);
that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that); that.mxqBtn.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips1.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.mxqTips2.removeEventListener(FYGE.MouseEvent.CLICK, function () { that.changeMainScene(Enum_1.SCENETYPE.PLAYGROUND); }, that);
that.letter && that.letter.removeEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that); that.letter && that.letter.removeEventListener(FYGE.MouseEvent.CLICK, that.openLetter, that);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that); FYGE.GDispatcher.removeEventListener(Enum_1.MSG.CHANGE_SCENE, function () { that.changeMainScene(Enum_1.SCENETYPE.BEADROOM); }, that);
FYGE.GDispatcher.removeEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that); FYGE.GDispatcher.removeEventListener(Enum_1.MSG.UPDATE_ENERGY, function (data) { that.updateEnergy(data); }, that);
...@@ -367,11 +367,11 @@ Page({ ...@@ -367,11 +367,11 @@ Page({
if (success) { if (success) {
my.hideLoading(); my.hideLoading();
app.openId = data.openId; app.openId = data.openId;
if(data.loadValue != 1){ if(data.customValue != 1){
this.initCanvas(); this.initCanvas();
} }
this.setData({ this.setData({
customValue:data.loadValue customValue:data.customValue
}) })
this.getActivityBaseInfoById(); this.getActivityBaseInfoById();
} }
......
...@@ -134,26 +134,28 @@ ...@@ -134,26 +134,28 @@
white-space: nowrap; white-space: nowrap;
} }
.shop .shop_gold_div { .shop .shop_gold_div {
width: 406rpx;
opacity: 1; opacity: 1;
height: 54rpx; height: 698rpx;
left: 370rpx; left: 365rpx;
top: 320rpx; /* margin-top: 320rpx; */
position: absolute; position: absolute;
transform-origin: 0rpx 0rpx 0rpx; transform-origin: 0rpx 0rpx 0rpx;
vertical-align: middle; vertical-align: middle;
display: flex; display: flex;
align-items: center; /* align-items: center; */
justify-content: space-around; justify-content: space-around;
flex-direction: column; flex-direction: column;
pointer-events: none;
} }
.shop .shop_gold { .shop .shop_gold_div .shop_gold {
opacity: 1; opacity: 1;
height: 54rpx; height: 54rpx;
left: 370rpx; /* left: 370rpx;
top: 320rpx; top: 320rpx; */
position: absolute; position: absolute;
transform-origin: 0rpx 0rpx 0rpx; transform-origin: 0rpx 0rpx 0rpx;
font-size: 23.47394rpx; font-size: 24rpx;
color: #7b644e; color: #7b644e;
vertical-align: middle; vertical-align: middle;
display: flex; display: flex;
......
{ {
"code": "000000", "code": "000000",
"data": { "data": {
"happyCoin": 90, "happyCoin": 1,
"list": [ "list": [
{ {
"_id": "5f6c3e7d114fbbc8c98bffae", "_id": "5f6c3e7d114fbbc8c98bffae",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment