Commit 485b3e90 authored by haiyoucuv's avatar haiyoucuv

按钮放反了

parent 28894b9f
This diff is collapsed.
...@@ -20889,6 +20889,9 @@ var SuccessStarGroup = (function (_super) { ...@@ -20889,6 +20889,9 @@ var SuccessStarGroup = (function (_super) {
var time2 = 100; var time2 = 100;
var max = 3; var max = 3;
var interval = 100; var interval = 100;
if (count < 1) {
return;
}
Tween.get(this.leftStarEn) Tween.get(this.leftStarEn)
.wait(wait) .wait(wait)
.set({ scaleX: max, scaleY: max }) .set({ scaleX: max, scaleY: max })
...@@ -21307,11 +21310,12 @@ var TaskItem = (function (_super) { ...@@ -21307,11 +21310,12 @@ var TaskItem = (function (_super) {
}); });
break; break;
case TaskType.follow: case TaskType.follow:
Main_1.GDispatcher.removeAllEventListenerByType(TaoBaoNet_1.TbNetName.favorShop);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.favorShop, {}, function (fs, fr) { TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.favorShop, {}, function (fs, fr) {
if (!fs) if (!fs)
return; return;
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.doFollowTask, { taskType: _this.data.taskType }, function (cs, cr) { return Main_1.GDispatcher.dispatchEvent(G_EVENT_1.G_EVENT.UPDATE_TASK); }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.doFollowTask, { taskType: _this.data.taskType }, function (cs, cr) { return Main_1.GDispatcher.dispatchEvent(G_EVENT_1.G_EVENT.UPDATE_TASK); });
}); }, true);
break; break;
case TaskType.invites: case TaskType.invites:
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.addStats, { type: 'invite' }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.addStats, { type: 'invite' });
...@@ -23839,14 +23843,20 @@ var MusicBtn = (function (_super) { ...@@ -23839,14 +23843,20 @@ var MusicBtn = (function (_super) {
if (isOn) if (isOn)
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMusic, { isOn: true }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMusic, { isOn: true });
Main_1.GDispatcher.addEventListener(G_EVENT_1.G_EVENT.ON_SHOW, _this.onShow, _this); Main_1.GDispatcher.addEventListener(G_EVENT_1.G_EVENT.ON_SHOW, _this.onShow, _this);
Main_1.GDispatcher.addEventListener(G_EVENT_1.G_EVENT.ON_HIDE, _this.onHide, _this);
return _this; return _this;
} }
MusicBtn.prototype.onShow = function () { MusicBtn.prototype.onShow = function () {
if (isOn) if (isOn)
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMusic, { isOn: true }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMusic, { isOn: true });
}; };
MusicBtn.prototype.onHide = function () {
if (isOn)
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMusic, { isOn: false });
};
MusicBtn.prototype.destroy = function () { MusicBtn.prototype.destroy = function () {
Main_1.GDispatcher.removeEventListener(G_EVENT_1.G_EVENT.ON_SHOW, this.onShow, this); Main_1.GDispatcher.removeEventListener(G_EVENT_1.G_EVENT.ON_SHOW, this.onShow, this);
Main_1.GDispatcher.removeEventListener(G_EVENT_1.G_EVENT.ON_HIDE, this.onHide, this);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMusic, { isOn: false }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMusic, { isOn: false });
_super.prototype.destroy.call(this); _super.prototype.destroy.call(this);
}; };
This diff is collapsed.
...@@ -184,6 +184,9 @@ export class SuccessStarGroup extends Container { ...@@ -184,6 +184,9 @@ export class SuccessStarGroup extends Container {
const time2 = 100; const time2 = 100;
const max = 3; const max = 3;
const interval = 100; const interval = 100;
if (count < 1) {
return;
}
Tween.get(this.leftStarEn) Tween.get(this.leftStarEn)
.wait(wait) .wait(wait)
.set({scaleX: max, scaleY: max}) .set({scaleX: max, scaleY: max})
......
...@@ -270,13 +270,14 @@ class TaskItem extends Item { ...@@ -270,13 +270,14 @@ class TaskItem extends Item {
}); });
break; break;
case TaskType.follow: case TaskType.follow:
GDispatcher.removeAllEventListenerByType(TbNetName.favorShop);
sendTbNet(TbNetName.favorShop, {}, sendTbNet(TbNetName.favorShop, {},
(fs, fr) => { (fs, fr) => {
if (!fs) return; if (!fs) return;
sendTbNet(TbNetName.doFollowTask, {taskType: this.data.taskType}, sendTbNet(TbNetName.doFollowTask, {taskType: this.data.taskType},
(cs, cr) => GDispatcher.dispatchEvent(G_EVENT.UPDATE_TASK) (cs, cr) => GDispatcher.dispatchEvent(G_EVENT.UPDATE_TASK)
); );
} }, true
); );
break; break;
case TaskType.invites: case TaskType.invites:
......
This diff is collapsed.
...@@ -230,7 +230,7 @@ export class MapScene extends Scene { ...@@ -230,7 +230,7 @@ export class MapScene extends Scene {
// Tools.gameOver({ // Tools.gameOver({
// level: 1, // level: 1,
// score: 666, // score: 666,
// stars: 2, // stars: 0,
// isVisitSuccess: true, // isVisitSuccess: true,
// isPrizeLevel: false, // isPrizeLevel: false,
// // tool: { // // tool: {
......
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